mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Add per-turn Cyber access program selection to exec and the SDK (#49939)
## Why `codex exec` and the TypeScript SDK need a way to request a Cyber access program for an individual turn. Resuming with an API key can also leave compaction using a saved program that the current credentials cannot access. ## What changed - Add `--cyber-access-program` with `standard`, `daybreak_blue`, and `daybreak_red`, and expose the equivalent `cyberAccessProgram` turn option and `CyberAccessProgram` type in the TypeScript SDK. - Apply explicit selections to new, resumed, and prompted fork turns. Override automatic Daybreak selection for that turn without changing the saved choice. Reject the flag for review and forks without a prompt. - Filter Cyber programs by the built-in OpenAI provider when starting turns and restoring previous-turn settings for compaction. - Allow previous-model compaction fallback with API-key authentication, comparing both model and program so a program change can trigger a retry with the current pair even when the model is unchanged. ## Testing Add CLI help, argument parsing, exec, and SDK coverage for per-turn selection and unsupported commands. Extend core tests for API-key compaction retries, denied explicit selections, custom-provider filtering, remote compaction, and WebSocket response reuse. GitOrigin-RevId: 586f25b621924f3bc509c9a39b39fe2020ff9cd2
This commit is contained in:
@@ -11,6 +11,8 @@ fn resume_parses_prompt_after_global_flags() {
|
||||
"--json",
|
||||
"--model",
|
||||
"gpt-5.2-codex",
|
||||
"--cyber-access-program",
|
||||
"daybreak_blue",
|
||||
"--dangerously-bypass-approvals-and-sandbox",
|
||||
"--skip-git-repo-check",
|
||||
"--ephemeral",
|
||||
@@ -22,6 +24,10 @@ fn resume_parses_prompt_after_global_flags() {
|
||||
assert!(cli.ephemeral);
|
||||
assert!(cli.ignore_user_config);
|
||||
assert!(cli.ignore_rules);
|
||||
assert_eq!(
|
||||
cli.cyber_access_program,
|
||||
Some(CyberAccessProgramCliArg::DaybreakBlue)
|
||||
);
|
||||
let Some(Command::Resume(args)) = cli.command else {
|
||||
panic!("expected resume command");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user