feat: wire ephemeral in codex exec (#10758)

This commit is contained in:
jif-oai
2026-02-05 15:49:57 +00:00
committed by GitHub
parent 4033f905c6
commit d337b51741
5 changed files with 65 additions and 1 deletions

View File

@@ -71,6 +71,10 @@ pub struct Cli {
#[arg(long = "add-dir", value_name = "DIR", value_hint = clap::ValueHint::DirPath)]
pub add_dir: Vec<PathBuf>,
/// Run without persisting session files to disk.
#[arg(long = "ephemeral", global = true, default_value_t = false)]
pub ephemeral: bool,
/// Path to a JSON Schema file describing the model's final response shape.
#[arg(long = "output-schema", value_name = "FILE")]
pub output_schema: Option<PathBuf>,
@@ -262,9 +266,11 @@ mod tests {
"gpt-5.2-codex",
"--dangerously-bypass-approvals-and-sandbox",
"--skip-git-repo-check",
"--ephemeral",
PROMPT,
]);
assert!(cli.ephemeral);
let Some(Command::Resume(args)) = cli.command else {
panic!("expected resume command");
};

View File

@@ -103,6 +103,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
cwd,
skip_git_repo_check,
add_dir,
ephemeral,
color,
last_message_file,
json: json_mode,
@@ -254,7 +255,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
include_apply_patch_tool: None,
show_raw_agent_reasoning: oss.then_some(true),
tools_web_search_request: None,
ephemeral: None,
ephemeral: ephemeral.then_some(true),
additional_writable_roots: add_dir,
};