codex exec resume should support --output-schema

Resolved 💬 2 comments Opened May 16, 2026 by outerlook Closed May 18, 2026

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 ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗