Support --output-schema for exec resume (#23123)

## Why

`codex exec resume` should have the same structured-output support as
top-level `codex exec`. Without `--output-schema`, multi-turn automation
has to choose between resumed session context and schema-validated JSON
output.

Fixes #22998.

## What changed

- Marked `--output-schema` as a global `codex exec` flag so it can be
passed after `resume`.
- Reused the existing output schema plumbing so resumed turns attach the
schema to the final response request while preserving session context.
This commit is contained in:
Eric Traut
2026-05-18 08:55:22 -07:00
committed by GitHub
parent fce10e009d
commit af6ffb6ebb
4 changed files with 68 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ pub struct Cli {
pub removed_full_auto: bool,
/// Path to a JSON Schema file describing the model's final response shape.
#[arg(long = "output-schema", value_name = "FILE")]
#[arg(long = "output-schema", value_name = "FILE", global = true)]
pub output_schema: Option<PathBuf>,
#[clap(skip)]