codex exec resume should support --output-schema

Resolved 💬 2 comments Opened May 16, 2026 by outerlook Closed May 18, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI, headless mode

What feature would you like to see?

codex exec resume should support --output-schema <FILE>, matching top-level codex exec.

Follow-up to #14343. That issue requested both -o and --output-schema for codex exec resume, but only the -o / --output-last-message part appears to be completed via #12538. Current codex exec resume --help shows -o, but not --output-schema.

Current behavior:

codex exec resume <SESSION_ID> --json --output-schema schema.json -o output.json "follow-up prompt"

fails because --output-schema is not accepted on exec resume.

Why this matters:

Multi-turn automation needs both:

  • resumed conversation/session context
  • schema-validated JSON output for each resumed turn

Without this, automated workflows have to choose between memory and structured output, or add brittle post-processing around free-form final messages.

Expected behavior:

codex exec resume <SESSION_ID> \
  --json \
  --output-schema schema.json \
  -o output.json \
  "follow-up prompt"

should behave like codex exec --output-schema, but preserve the resumed session context.

Additional information

Related issues:

  • #14343: exact original request, closed as not planned due to low upvotes
  • #12538: completed -o / --output-last-message support for exec resume, but does not cover --output-schema

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14343

Powered by Codex Action

etraut-openai contributor · 3 months ago

Thanks for the feature request. This will be included in an upcoming release.