Skip to content

fix(native-chat): only save and send a Codex speed the user picked - #27630

Draft
brennanb2025 wants to merge 8 commits into
mainfrom
brennanb2025/codex-tier-only-when-picked
Draft

brennanb2025 wants to merge 8 commits into
mainfrom
brennanb2025/codex-tier-only-when-picked

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​88 $\color{#cf222e}{\Huge{\mathbf{−}}}$​59 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​29
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92 $\color{#cf222e}{\Huge{\mathbf{−}}}$​51 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​41

ELI5

If your Codex config sets a speed (say Ultrafast) and a native chat opens on a model that can't use it, Orca showed Standard and then quietly saved Standard as if you had picked it. From then on that chat sent Standard with every message, so switching to a model that can run your configured speed never got it back, even after a restart. Now Orca only saves and sends a speed you actually picked; otherwise Codex applies your configured speed on each model, and the picker shows what that will be.

What Changed

Before (since #26962 added the Speed picker):

  • Your Codex config has service_tier = "ultrafast". You open a chat on GPT-6 Luna, which does not offer Ultrafast. The picker correctly shows Standard.
  • You switch to GPT-6.1 Sol, which does offer Ultrafast. The chat stays on Standard and every message is sent as Standard, so your configured Ultrafast never applies. The same happened after Sol → Luna → Sol without ever touching the picker.
  • The Standard was saved with the chat, so it stuck across restarts.

After:

  • With no pick, Orca sends no speed. Codex applies your configured speed on every message and leaves it out on a model that doesn't offer it, the way Codex itself works.
  • The picker shows that outcome: your configured speed on a model that offers it, Standard on one that doesn't. In the example, Luna shows Standard and Sol shows Ultrafast again.
  • A speed you picked is saved and sent with every message, and is never rewritten. On a model that doesn't offer it the picker shows Standard and messages go out as Standard, so what you see is what runs; your pick applies again when you switch back to a model that offers it. Before, switching to such a model replaced your pick with Standard for good, and that Standard was also remembered as the speed for your next new chat.

Mechanism: the Codex chat keeps the user's picks in one map, which is what goes out on each message, what is saved with the chat, and what the app remembers for the next chat. A fallback wrote default into that map whenever the chosen or configured speed wasn't offered by the current model, turning a display decision into a saved pick. The fallback is removed: the map now only ever holds what the user picked, and the speed the picker shows is derived on every read from the pick (else the configured speed) and the current model. A model offers a speed when it lists it, plus Standard everywhere and Flex, which Codex runs on every model without listing it; any other speed Codex leaves out, so the picker shows Standard for it.

What the picker shows is worked out in one Codex helper: Standard for a speed the model doesn't offer, and Flex added to the model's choices while it is chosen. The same helper decides what a message sends, so the two never disagree. The Codex side uses it both for a running chat and, through the Codex agent's resting-options hook, for a chat that isn't running, so a client that predates this change, paired with a newer host, sees the same values. On the app side, the Speed option also declares that a value the model doesn't list runs as Standard. That covers the moment right after a model switch, before Orca re-reads the options, and a new chat started from a remembered pick.

Why

A speed the user never picked is neither sent nor saved, so the agent's own configuration stays in charge. Deriving the shown value instead of storing it also removes the stale-pick bug class rather than adding another guard. Making Codex's per-model default speed (Fast for some models) apply automatically was considered and left out: Codex applies it only in its own terminal app, not for chats like Orca's, and doing so would raise usage without the user choosing it.

Linked Issue

None; follow-up to #26962 (known gap listed in its notes).

Visual Proof

N/A: no new UI. The only visible difference is that the Speed picker no longer shows a raw lowercase tier id (for example ultrafast) as an extra choice on a model that doesn't offer it; it shows Standard there, which is what runs.

Testing

  • Automated tests added/updated
  • One flow test (fails on main): with Ultrafast in the Codex config and nothing picked, Luna shows Standard and sends no speed, Sol shows Ultrafast and still sends none, and nothing is saved; after picking Ultrafast, Luna shows and sends Standard while the pick is kept, and Sol shows and sends Ultrafast again.
  • With the chat not running, a saved speed the model doesn't offer shows Standard, so older apps see what runs (fails without the change).
  • Existing tests updated: an unlisted configured speed shows Standard; a saved pick with no model list yet is kept and sent; picking a speed the current model doesn't offer is refused; a configured Flex stays pickable and shows as a Flex choice.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Wire compatibility: no field or message changes. The host publishes the shown speed for running and resting chats alike, so older clients see the same values; older clients still read Fast on/off derived from it. One gap for older clients: right after a model switch they briefly show the raw kept pick until their own follow-up read, which already corrects it.
  • Small known gap: a new chat started from a remembered Flex pick shows Standard until the host's first read lists Flex.
  • SSH: the Codex adapter runs on the host that runs Codex, so the same rule applies on remote hosts.
  • Only Codex chats are affected; Claude's Fast toggle is untouched.
  • Not cleaned up: a Standard that feat(native-chat): offer Codex Ultrafast as a speed choice #26962 already saved without a pick (in a chat, or remembered for new chats) stays, and now reads as a real Standard pick. No migration, since native chat has no real users yet; picking a speed again replaces it.

…d it

With no pick, the picker derives what to show from the thread's reported
tier and the current model instead of writing Standard into the picks, so
Codex keeps applying the user's configured tier per model.
…cker shows

A pick the model does not offer is kept (Codex leaves it out, so that
model runs standard) and applies again on a model that offers it, so no
Standard nobody chose is saved or remembered. Codex runs flex on every
model and leaves out any other unlisted tier, which the shown tier now
follows.
The Speed option declares that an unlisted value runs its default, so the
picker shows Standard for a carried, saved or seeded pick the current model
does not offer instead of a raw tier id. The Codex host lists Flex as a
choice while the chat runs it, since Codex runs it on every model.
…would

One Codex helper derives the shown tier and lists Flex while it is chosen;
the live read and, through the agent's resting options, the at-rest read
both use it, so an older client paired with this host never sees a raw
tier id either, and a saved Flex shows as Flex before the chat starts.
…ffer

What a turn sends now matches what the picker shows: a picked tier the
current model does not offer goes out as Standard, while the pick itself is
kept and applies again on a model that offers it.
…ehavior

One flow test covers an unpicked configured tier and a kept pick across
models (shown, sent and saved); redundant per-step tests are dropped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant