Skip to content

codex exec resume should support --output-schema #22998

@outerlook

Description

@outerlook

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestexecIssues related to the `codex exec` subcommandsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions