feat(codex): choose a cyber access program for Daybreak-eligible models#27006

closed2
main
GitHub fork: feat/codex-cyber-access-program
opened14d agobyMMartin Meredith
View on GitHubTwo-way sync enabledPR last imported 12d ago

Continued in #27928 with the rebased commits and the before/after evidence requested below. GitHub rejected reopening this PR after the branch rebase.

Problem

OpenAI's Daybreak programme only applies to a Codex app-server turn when that turn's turn/start carries cyberAccessProgram. The daybreak setting in config.toml and saved thread preferences do not reach app-server turns (OpenAI guide). T3 never sent the field, so a user with Daybreak access cannot use it from T3. The turn/start encode schema in effect-codex-app-server also dropped the field, because Codex marks it experimental and leaves it out of the stable JSON schema the generator reads.

Change

  • CodexProvider.ts: models whose model/list entry lists a programme other than standard in availableAccessPrograms.cyber get a "Cyber Access" select. Its options are "Automatic" (the default) plus the programmes Codex lists. Other models are unchanged.

  • CodexAdapterV2.ts: buildCodexTurnStartParams sends the chosen programme on every turn. "Automatic" omits the field, so Codex keeps its current behaviour.

  • client.ts and the adapter's turn/start schema: add cyberAccessProgram with Schema.fieldsAssign, as T3 already does for collaborationMode and additionalContext. Without this, the client strips the field before it reaches Codex. No generated code changes.

  • CodexProvider.ts: a bare custom Codex model borrows the first built-in model's options, but not Cyber Access, because Daybreak eligibility is per model.

  • docs/user/providers-codex.md: a short "Use Daybreak" section.

delegate_task checks options against the model's option list, so agents can set the option with no further change.

Scope and approval

Proposed in https://github.com/pingdotgg/t3code/discussions/26995.

This is a configuration option for a capability Codex already has. The app server accepts cyberAccessProgram, the Codex CLI exposes the same setting as /daybreak, and T3 already decodes availableAccessPrograms from model/list. The option controls only that one turn parameter, and it appears only on models where Codex offers a Daybreak programme.

Verification

Focused tests:

  • CodexProvider.test.ts: there is no select for a standard-only model, and the expected options appear for ["standard", "daybreakBlue"].
  • CodexProvider.test.ts: a custom model that borrows a Daybreak-eligible model's options gets reasoning but not Cyber Access. It fails without the fix.
  • CodexAdapterV2.test.ts: the field is omitted when nothing or "Automatic" is chosen, and set for standard and daybreakBlue.
  • CodexAdapterV2.test.ts replay test: cyberAccessProgram: "daybreakBlue" reaches the outbound turn/start frame. With the client.ts change reverted, this test fails because the client strips the field.

Rebased onto main at d92c437baa19; current head is e960980a5f6c. git range-diff confirms both original commits are unchanged by the rebase, with authorship preserved. vp run check:changed passed: format, lint, both knip checks, GraphQL generation, typecheck (4 packages), and 5 test files (137 tests).

Browser verification on the rebased branch: GPT-6-Luna offers Automatic, Standard, and Daybreak Blue; selecting Daybreak Blue survives a reload. GPT-6.1-Sol keeps its existing options without Cyber Access. Captures compare current main and the rebased branch using the same isolated environment and 1280 × 800 viewport.

Original implementation verification (not repeated during this rebase): live checks against Codex 0.164.0 with a ChatGPT account approved for Daybreak Blue:

  • model/list returned ["standard", "daybreakBlue"] for gpt-6-sol, gpt-6-luna and the gpt-5.6 models, ["daybreakBlue"] for gpt-daybreak-blue-latest, and ["standard"] for gpt-6.1-sol, gpt-6.1-terra and gpt-6-astra.
  • A turn on gpt-6-sol with cyberAccessProgram: "daybreakBlue" completed normally.
  • The same turn on gpt-6.1-sol failed with 403 Daybreak isn't available for this model, so the backend reads the field. This is why the select only appears where Codex lists a Daybreak programme.

Not checked:

  • Codex returns no field that confirms which programme a turn used.
  • Codex-native subagents: updateSubagentSelection rebuilds only reasoningEffort and serviceTier, so a native subagent spawned mid-turn does not inherit the choice. I left that out of this PR to keep it to one problem.

Before / after UI evidence

Matching captures from the same isolated development environment at 1280 × 800. Before: main at d92c437baa19. After: rebased PR at e960980a5f6c.

Eligible model: GPT-6-Luna

Before: the model options have reasoning, service tier, and permissions, with no Cyber Access choice.

After: Cyber Access offers Automatic, Standard, and Daybreak Blue. Daybreak Blue is selected and survives a page reload.

Unsupported model: GPT-6.1-Sol

Before: the model options show reasoning, service tier, and permissions.

After: the same controls remain, with no Cyber Access choice.

Original implementation by Martin Meredith, assisted by Claude Opus 5.5 in Claude Code. Rebased and verified with gpt-6.1-sol in the Codex harness through T3 Code.

🤖 Generated with Claude Code

Checks

18 failing · 7 successful · 10 skipped
Some checks failed

Failing18

d4613e2

Added 1 commit

  • feat(codex): choose a cyber access program for Daybreak-eligible models4cdbb99
Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 4cdbb99539532a64323490a014890d3eb27b74a9 and d4613e22f71343ef9cbc067c88cdec633d8b2366.

External image Files selected for processing: 5
  • apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
  • apps/server/src/provider/CodexProvider.test.ts
  • apps/server/src/provider/CodexProvider.ts
  • docs/user/providers-codex.md
  • packages/effect-codex-app-server/src/client.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

Codex model capabilities can expose cyber access program choices. The adapter includes a selected program in Codex turn-start requests when defined. The Automatic choice is omitted from the request.

Changes: Codex cyber access program

Layer / File(s)Summary
Expose cyber access options
apps/server/src/codexModelOptions.ts, apps/server/src/provider/CodexProvider.ts, apps/server/src/provider/CodexProvider.test.ts, docs/user/providers-codex.md
Adds an Automatic option and labels for known programs. Models with a non-standard program receive a Cyber Access selector. Custom models do not inherit this selector from fallback capabilities. Tests and documentation cover the option behavior.
Pass the selection to turn/start
packages/effect-codex-app-server/src/client.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts
The turn-start schemas accept an optional cyber access program. The adapter sends defined selections and omits absent or Automatic values. Tests cover value handling and a completed replay turn.

Priority: External image Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

mermaid
1sequenceDiagram
2 participant CodexProvider
3 participant ModelSelection
4 participant CodexAdapterV2
5 participant turnStart
6 CodexProvider->>ModelSelection: Exposes cyber access program options
7 ModelSelection->>CodexAdapterV2: Provides selected program
8 CodexAdapterV2->>turnStart: Sends defined cyberAccessProgram

Possibly related PRs

  • pingdotgg/t3code#23184: Implements Codex cyber access program capability and turn forwarding, which this change extends with Automatic handling and custom-model filtering.

Suggested reviewers: juliusmarminge, t3dotgg

Merge Risk: External image Minimal · up to d4613

No actionable merge-blocking risk remains from the reviewed changes.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Description checkPassedThe description covers the problem, implementation, scope approval, focused verification, live checks, limitations, and screenshots. It also identifies the agent and harness used.
Title checkPassedThe title clearly and concisely describes the main change: selecting a cyber access program for Daybreak-eligible Codex models.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Added 1 commit

  • fix(codex): custom models do not inherit Daybreak accessd4613e2

Note

Written by gpt-6.1-sol on behalf of Maria

dry-run draft, no action taken.

closure is warranted under the verification rule. The Cyber Access option is supported by focused tests and live Codex requests, but its new model option is shown only in an after screenshot without the required before/after UI evidence.

Add matching before/after captures of the model options, including an eligible model and the unchanged unsupported-model state, alongside the existing provider-path checks.