You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): keep the launch effort when a terminal agent starts on its default model - #47975
If Orca starts a terminal agent on its default model and you only chose a reasoning effort (for example Codex with Effort High), the chat bar's model pill used to show no effort at all. Now it shows the effort right away and keeps it after the agent reports which model it is running.
What Changed
Before: if you launch Codex with Model left on default and Effort High, its command gets -c model_reasoning_effort=high, but the Chat view pill reads Model, then GPT-5.5 once the agent reports its model. No effort is shown at any point. Grok showed the effort at first and then lost it on the first model report.
After: the pill reads Model · High right away and GPT-5.5 · High after the report.
How it works (all in src/shared/native-chat/input/session-options/):
The in-memory session-option record has a new valuesWithoutModel slot. It holds the values the session runs while its model is still unknown. seedNativeChatAppliedSessionOptions used to return early when the launch named no model. Now it saves the model-independent options (the catalog's unknownModelOptions, minus anything composed into the model id, like Cursor's) in that slot.
The snapshot shows the slot's values through unknownModelOptions, and only the ones that hold a value. A launch with no effort therefore gets no empty Effort row.
On the first model report, the record keeps only the slot values the reported model offers, with their original source (applied/dispatched). Then it drops the slot. If the report itself carries a value, that value wins.
Picking from a chip or typing /effort before the model is known writes to the same slot. Picking a different model or losing the model discards it. Re-picking the model the session already runs keeps it.
getTrackedSessionOption/clearTrackedSessionOption now read the model from the record instead of taking a modelId argument. setTrackedSessionOption drops its fallbackModelId argument, since the slot replaces that Grok-only fallback.
A pick that is in flight when the first report adopts the launch value is no longer treated as superseded. That report only names the model the CLI already ran.
Why
A default-model launch was the only path where the effort you chose never showed up, and Claude, Codex and Grok each lost it in a different way. Alternatives that were rejected:
A placeholder model key in valuesByModel: it would leak into persisted and draft selections as a model value.
Attaching the values to the CLI-default row: Codex and Claude have no row known to be the CLI default, and Grok's row is wiped by the first report.
Always showing an Effort row: every session launched without an effort would get an empty row.
Real app (E2E build, background launch), Codex launched with default model and Effort High through the New workspace composer, pill read before and after a gpt-5.5 model report. These are the original contributor's captures from #47975. The follow-up commits in this squash only harden edge cases (an empty model name in a report, a pick dispatched while the first report arrives, re-picking the same model) and don't change this flow.
Before the model report
After the model report
main
this PR
Accessible names: main Model and effort then Model GPT-5.5 (no Effort control). This PR: Model and effort, Effort High then Model GPT-5.5 · High, Effort High.
Testing
Platform: macOS. The change is shared, platform-independent logic with no paths, shell or IO.
New native-chat-session-option-values-without-model.test.ts (4 tests) drives the real seed → PTY surface → status report path for Codex, Claude, Grok and Cursor:
an effort the reported model offers survives the first report, and one it doesn't offer is dropped
options composed into the model id (Cursor) are excluded
a chip pick before the model is known replaces the launch effort and survives the report
a pick dispatched while the first report lands is kept (Grok effort and Claude fast-mode toggle)
re-picking the default model the session already runs keeps the launch effort
All 4 fail on main and pass on this branch.
vitest run src/shared/native-chat/input/session-options/: 2 files, 11 tests passed.
On the touched files: oxlint, oxfmt --check, the anti-slop and code-quality oxlint configs, ast-grep scan, and check-changed-code-quality.mjs. All clean.
I manually tested these changes locally (verified with the scripted real-app probe above, not an interactive session with a real Codex, Grok or Claude CLI)
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None measurable. The new work runs only at launch, on a model report, or on an option pick. It adds one small object per terminal tab, with no IO, polling, subprocess or new subscription. On a steady stream of model reports, the extra check returns early when there is no slot. Benchmark below: status report plus getSnapshot(), 20k iterations × 5 rounds, median µs per call, old → new:
Case
main
this PR
Codex launched with a model
0.27
0.27–0.28
Codex launched on default model + effort
0.22–0.23
0.22
Claude, nothing seeded
0.22
0.22–0.24
Adversarial: model flips on every report
1.48–1.50
1.70–1.71
Worst single call was under 0.12 ms in every case, far below a 16 ms frame. The adversarial case doesn't happen in practice, since real sessions report a stable model.
Risk
Level: Low
Grok: while Grok's model is unknown, a pick is now stored in the slot instead of under the default row, and it survives the first report. Before, that report erased it.
/model typed in the TUI before the first report: chat cannot see this. The launch effort can be carried onto the new model if that model offers it. It stays marked applied, and any effort in a later report replaces it.
Reported model Orca does not list: the stand-in model has no options, so the effort is dropped. This matches the no-guessed-options stance.
Remote, mobile and older clients: the state is in memory only, with no saved settings, migration or protocol change. Headless orca serve and the phone use the same shared record. The phone does not seed launch values yet, so there only a pick or typed /effort fills the slot.
Back out: a plain revert.
Review
Reviewed in a maintainer bug-bash pass. The follow-up commits squashed in here fix: an empty model name in a report dropping the slot; a pick made before the model is known being lost when the first report lands mid-dispatch; seeding only options a model-less launch actually applies; and some cleanups.
Original fix by @yohangwak in #47975. Their authorship is preserved on the commit.
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
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (targeted checks run locally; CI covers the full suite)
No actionable comments were generated in the recent review.
Walkthrough
Native chat session options can now be stored before a model is known. Commands and snapshots use those unmodeled values, and values can be adopted when a model is reported or selected. Cache seeding also stores non-model options without a model. New tests cover launch values, pre-report selections, and re-selecting an already-running default model.
Severity of issue fixed: Medium
Merge Risk: Low · up to 69499
Terminal agent chat chips now keep a chosen reasoning effort visible while the model is unknown. A narrow race, where the first model report arrives during an effort dispatch, may still drop the selection. The impact is limited to display state, so merge risk is low.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a chosen reasoning effort stays visible when a terminal agent starts on its default model. It is a fix under the native-chat scope and matches the diff, which adds a v…
Description check
The description follows the repository template. It includes ELI5, What Changed (before and after plus mechanism), Why (with alternatives considered), Linked Issue (Fixes #47976), Visual Proof (before…
Linked Issues check
Issue #47976 is the only active directly linked issue, so its requirements apply. The supplied whole-PR summary covers each requirement. (1) Launch effort shown as applied: seedNativeChatAppliedSessio…
Out of Scope Changes check
All changed files sit under src/shared/native-chat/input/session-options/ and serve the #47976 objective: seed, snapshot, state, commands, apply, pty-session-options, the new helper module, and the ne…
Full details: Title check
Explanation
The title names the main change: a chosen reasoning effort stays visible when a terminal agent starts on its default model. It is a fix under the native-chat scope and matches the diff, which adds a valuesWithoutModel slot that keeps launch values, and the linked issue #47976 describes the same gap. The title is 90 characters, slightly above a typical short title, but it is still one clear sentence.
Full details: Description check
Explanation
The description follows the repository template. It includes ELI5, What Changed (before and after plus mechanism), Why (with alternatives considered), Linked Issue (Fixes #47976), Visual Proof (before and after tables), Testing, Performance, Risk (level Low, with back-out plan), AI Disclosure, Review, and the checklist. The Performance section is filled with a valid 'None, because' sentence. The Risk section names the riskiest parts and the revert path. The Visual Proof section uses before/after images with DOM readings, which meets the UI-change requirement. Minor gaps: the 'Level' field is filled, but the Testing section leaves the manual-testing box unchecked with an explanation. The description is mostly complete and well above the pass threshold.
Full details: Linked Issues check
Explanation
Issue #47976 is the only active directly linked issue, so its requirements apply. The supplied whole-PR summary covers each requirement. (1) Launch effort shown as applied: seedNativeChatAppliedSessionOptions records eligible values in valuesWithoutModel when the launch has no model, and the snapshot exposes catalog unknown-model options that hold a value (nativeChatOptionsWithoutModel). (2) First model report: adoptNativeChatValuesWithoutModel adopts only IDs the reported model offers, keeps the original source (applied or dispatched), lets a value carried by the report win, and deletes the slot. (3) Later pick or typed /effort: setTrackedSessionOption writes the slot while the model is unknown. A different-model pick clears the slot, and re-picking the current model carries it (carryNativeChatValuesWithoutModel). Composed options are excluded. Tests in native-chat-session-option-values-without-model.test.ts cover adoption, unlisted-model drop, pre-report picks, and the Grok re-pick case. Limits: the repository diff tools were unavailable in this review, so I could not read the incremental changes from the previous reviewed heads (03dafb5, 80bc093) to head 694996d. The conclusion relies on the supplied whole-PR summary and the prior helper-file inspection. I did not re-run the tests.
Full details: Out of Scope Changes check
Explanation
All changed files sit under src/shared/native-chat/input/session-options/ and serve the #47976 objective: seed, snapshot, state, commands, apply, pty-session-options, the new helper module, and the new test file. Removing the fallbackModelId argument from setTrackedSessionOption follows from the slot replacing that fallback. The Grok default-row behavior change is part of the linked issue's scope. The PR excludes phone work (#47912, #47913) and issue 25951, and the supplied evidence shows no unrelated change. Limit: the repository diff tools were unavailable, so the incremental changes since the previous reviewed heads were assessed from the supplied summary only.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Do not discard an effort selection when the first… · native-chat-session-option-apply.ts:262-263
src/shared/native-chat/input/session-options/native-chat-session-option-apply.ts:262-263 Minor · Functional Correctness · Heavy lift
Do not discard an effort selection when the first model report arrives.
Start the new Claude pre-report path with launch effort high. Call setOption('effort', 'low'), then receive a model-only report before dispatchCommand resolves.
The report changes the tracked model from null to claude-opus-5-5. This guard then discards the successful effort completion. The session runs low, but the snapshot retains the adopted launch effort or an unknown value.
Distinguish first-model adoption from a model switch. Preserve the completed effort selection when the first report does not contain a newer effort. Continue to reject completions superseded by an actual model switch or newer option selection.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 50e366b5-83e9-45e9-aea0-03c0b146d03a
Commits
Reviewing files that changed from the base of the PR and between 6efc8b5 and 80bc093.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
… on its default model
A terminal agent launched with no model but a chosen reasoning effort
(e.g. Codex with `-c model_reasoning_effort=high`) showed no effort in
the chat model pill, and Grok lost it on the first model report.
The session-option record now holds a `valuesWithoutModel` slot for
values the session runs while its model is unknown. The launch seed
stores values there, the snapshot shows them through the catalog's
unknown-model options, and the first model report adopts only the
values the reported model offers (a value the report carries wins).
Chip picks and typed `/effort` write the same slot; picking a different
model or losing the model discards it, re-picking the running model
keeps it.
Fixesstablyai#47976
Co-authored-by: Neil <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If Orca starts a terminal agent on its default model and you only chose a reasoning effort (for example Codex with Effort High), the chat bar's model pill used to show no effort at all. Now it shows the effort right away and keeps it after the agent reports which model it is running.
What Changed
Before: if you launch Codex with Model left on default and Effort High, its command gets
-c model_reasoning_effort=high, but the Chat view pill readsModel, thenGPT-5.5once the agent reports its model. No effort is shown at any point. Grok showed the effort at first and then lost it on the first model report.After: the pill reads
Model · Highright away andGPT-5.5 · Highafter the report.How it works (all in
src/shared/native-chat/input/session-options/):valuesWithoutModelslot. It holds the values the session runs while its model is still unknown.seedNativeChatAppliedSessionOptionsused to return early when the launch named no model. Now it saves the model-independent options (the catalog'sunknownModelOptions, minus anything composed into the model id, like Cursor's) in that slot.unknownModelOptions, and only the ones that hold a value. A launch with no effort therefore gets no empty Effort row.applied/dispatched). Then it drops the slot. If the report itself carries a value, that value wins./effortbefore the model is known writes to the same slot. Picking a different model or losing the model discards it. Re-picking the model the session already runs keeps it.getTrackedSessionOption/clearTrackedSessionOptionnow read the model from the record instead of taking amodelIdargument.setTrackedSessionOptiondrops itsfallbackModelIdargument, since the slot replaces that Grok-only fallback.Why
A default-model launch was the only path where the effort you chose never showed up, and Claude, Codex and Grok each lost it in a different way. Alternatives that were rejected:
valuesByModel: it would leak into persisted and draft selections as amodelvalue.Linked Issue
Fixes #47976
Visual Proof
Real app (E2E build, background launch), Codex launched with default model and Effort High through the New workspace composer, pill read before and after a
gpt-5.5model report. These are the original contributor's captures from #47975. The follow-up commits in this squash only harden edge cases (an empty model name in a report, a pick dispatched while the first report arrives, re-picking the same model) and don't change this flow.Accessible names: main
Model and effortthenModel GPT-5.5(no Effort control). This PR:Model and effort, Effort HighthenModel GPT-5.5 · High, Effort High.Testing
Platform: macOS. The change is shared, platform-independent logic with no paths, shell or IO.
New
native-chat-session-option-values-without-model.test.ts(4 tests) drives the real seed → PTY surface → status report path for Codex, Claude, Grok and Cursor:All 4 fail on main and pass on this branch.
vitest run src/shared/native-chat/input/session-options/: 2 files, 11 tests passed.On the touched files: oxlint,
oxfmt --check, the anti-slop and code-quality oxlint configs,ast-grep scan, andcheck-changed-code-quality.mjs. All clean.I manually tested these changes locally (verified with the scripted real-app probe above, not an interactive session with a real Codex, Grok or Claude CLI)
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None measurable. The new work runs only at launch, on a model report, or on an option pick. It adds one small object per terminal tab, with no IO, polling, subprocess or new subscription. On a steady stream of model reports, the extra check returns early when there is no slot. Benchmark below: status report plus
getSnapshot(), 20k iterations × 5 rounds, median µs per call, old → new:Worst single call was under 0.12 ms in every case, far below a 16 ms frame. The adversarial case doesn't happen in practice, since real sessions report a stable model.
Risk
Level: Low
/modeltyped in the TUI before the first report: chat cannot see this. The launch effort can be carried onto the new model if that model offers it. It stays markedapplied, and any effort in a later report replaces it.orca serveand the phone use the same shared record. The phone does not seed launch values yet, so there only a pick or typed/effortfills the slot.Review
Reviewed in a maintainer bug-bash pass. The follow-up commits squashed in here fix: an empty model name in a report dropping the slot; a pick made before the model is known being lost when the first report lands mid-dispatch; seeding only options a model-less launch actually applies; and some cleanups.
Original fix by @yohangwak in #47975. Their authorship is preserved on the commit.
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (targeted checks run locally; CI covers the full suite)