Verified Codex
Get a fixed-shape result with --output-schema
What it does
Give codex exec a JSON Schema file and the final response is validated against it — easy to pipe into the next step.
How
codex exec --output-schema schema.json "List every TODO with its file"
How much to trust this
| Applies to | ≥ 0.163.0 |
|---|---|
| Verified | Oct 17, 2026 · v0.163.0 · tested locally 本机 codex-cli 0.163.0 的 --help 中存在相关参数 |
| Depends on | codex exec--output-schema |
| Source | https://developers.openai.com/codex/cli/reference (official_docs) |