Skip to content

Keep model choices coherent across Claude updates - #30107

Merged
brennanb2025 merged 49 commits into
mainfrom
brennanb2025/claude-model-catalog-arch
Oct 21, 2026
Merged

brennanb2025 merged 49 commits into
mainfrom
brennanb2025/claude-model-catalog-arch

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 58 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2103 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1376 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​727
Prod 80 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2258 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1307 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​951

The problem on main today

Claude and Codex chats show a model picker with each model's efforts, speed tiers and Fast support. On main that list has two writers: Orca's own discovery of the installed CLI, and every running chat, which writes the list its own (possibly older) CLI process reports. Whichever answered last wins.

So after you update the Claude or Codex CLI in place, an old chat that was started before the update can write the old list back: the picker can lose new models, show models the installed CLI no longer has, or offer efforts that differ from chat to chat for the same model. The list can also differ by which chat you happen to look at, because it isn't tied to where and how the agent actually launches (account, project folder, launch arguments, the agent environment you set in Orca).

What changes for you

  • For Claude and Codex, the picker always shows the installed CLI's list for the place the chat runs: the same host, account, project folder, launch arguments and Orca agent environment. Opening a picker (desktop or phone) refreshes that list if it's more than two minutes old; until a refresh succeeds you keep seeing the last good list, with no flashing or jumping controls.
  • Running chats never change the shared list. They only report what actually ran.
  • Your per-chat choices are untouched: the saved model, effort and speed stay exactly as you picked them (including aliases like opus[1m] and models the installed CLI doesn't list) and are what gets sent.
  • After an in-place CLI update, a chat that is still running shows the installed list's choices until it restarts, while still sending its saved model and effort (accepted change from main).
  • A new chat with no pick shows and sends the installed CLI's own default (or your project's configured default), not a built-in fallback.
  • Grok, OpenCode, OMP and Pi behave exactly as on main.
  • Older phones and older paired servers keep working through their existing routes.

How it works

  • One owner per execution host + account + launch context discovers the installed CLI's list (Claude's startup probe; Codex's paged model/list plus its configured defaults). The list's identity is the resolved executable, effective launch arguments, launch folder, account and the per-agent environment configured in Orca; the captured login-shell environment is deliberately not part of it, so per-shell values like ssh-agent sockets don't force re-listing.
  • The picker's choices come from one host projection of that list (or the built-in fallback, only when the list is unknown, never mixed) plus the chat's literal saved selection. The check applied to a pick, the defaults and the first-run record read the same list through their own existing paths; the first-run record stays driven by what actually ran, never by the list's default. A model the list doesn't contain appears as its own row with no borrowed controls.
  • A successful discovery replaces the list and its configured default together; a failed one keeps the last good list for display. Saved lists are display-only until this process completes a discovery for that exact context.
  • Clients that advertise the existing coherent-catalog capability take choices from that list and take only values from a chat's options answer; older clients and Grok/OpenCode/OMP/Pi keep main's merge (an older client reopening a chat also gets that chat's saved model added to the list it reads).
  • Saved-only reads (for example saving a permission change) never start a CLI probe. They can still wait on unrelated list bookkeeping, as on main today; that is temporary and tracked in STA-11529.

Differences from the common pattern

All intended; none temporary in this PR except where a ticket is named.

  • Intended: the list comes from probing the installed CLI per host/account/launch context instead of a maintained per-release manifest. Orca runs on several hosts (local, SSH, WSL, phone-paired) and must reflect each install's real list without a value someone updates every release.
  • Intended: a saved model or effort that the list doesn't offer is kept literally and still sent, rather than being replaced by a default; it shows as its own row with no borrowed controls.
  • Intended: an unknown list and a known empty list are different (fallback models only for unknown), so nothing refuses a pick on fabricated data.
  • Intended: discovery is scoped per execution host, account, folder and launch configuration, and older clients/servers keep their routes, because Orca supports several hosts, phones and mixed client/server versions.
  • Intended: refresh is on demand (picker open, two-minute freshness) with last-good display and a separate current-process proof before the list can refuse a pick.
  • Intended: Codex's existing effective-speed rule is unchanged.
  • Temporary (tracked in STA-11528): with an agent's CLI missing, an ordinary picker read can still wait on a login-shell lookup before the 30-second hold applies; no user action waits on it.
  • Temporary (tracked in STA-11619): when a chat's installed list is verified, picking an effort or Fast setting that the list doesn't offer for the chosen model is refused. This is narrower than main, which refuses against its merged list. It is removed together with STA-11529 in the follow-up PR, after which picks read only the in-memory list and are never refused or held by it.

Related issues found during review and left as they are on main: tracked in STA-11527 (a retired saved Claude model fails again on the second message after recovery) STA-11529 (saving a chat option can wait on unrelated list bookkeeping) and STA-11620 (in a new Codex chat where nothing was picked, the picker shows the default effort before the first message but no effort after the reply, although the turn ran at that effort).

Verification

Current head 67d307e adds only merges of main after the last real QA run on 83807e6: #31628 (mobile picker selected-option visibility, which touches a picker file this PR also changes) and #31581 (CI installs fish 4 directly). Neither changes agent code. A separate review confirmed both PRs' mobile picker behaviour survives the merge, and CI (including Mobile verify) is green on 67d307e.

Real QA with real Claude and Codex (through the team load balancers), each test copy in its own throwaway home, comparing main against this branch. Codex was retested on the current head 83807e6 after main's Codex change (#30883, catch-up of turns made outside Orca) was merged in. Claude and Codex were tested on 04ed370 on macOS, and the full set on Windows at a484565. The merge into 83807e6 changed no Claude code.

Current head 83807e6 (macOS, Codex), all passed, 9 real replies:

  • Existing chat across the upgrade and two restarts. A Codex chat on GPT-6-Sol High Fast was started on main, then reopened on this branch twice. It kept its pick without reselection, its history showed every turn once and in order, and it replied four times in the same conversation; Codex's own logs show gpt-6-sol, high and Fast on every turn.
  • New chat with nothing picked. The picker showed all 8 installed models, and the turn ran the installed default (GPT-6.1-Sol, Low) with no speed sent.
  • Fast per chat (STA-10001). Two new chats both ran Fast; switching only one to Standard made only that chat's next turn run Standard.

Current head 83807e6: the existing Codex chat after the upgrade keeps GPT-6-Sol High Fast, and replies after the second restart:
v11-c1-branch-retained-picker.png
v11-c1-branch-second-restart-reply.png

Current head 83807e6: one chat switched to Standard, the other still Fast:
v11-c3-a-standard.png
v11-c3-b-still-fast.png

Final head 04ed370 (macOS), all passed, 15 real replies (7 Claude, 8 Codex):

  • Existing chats survive the upgrade and a restart. A Claude chat on Opus (1M context) High and a Codex chat on GPT-6-Sol High Fast were started on main, then reopened on this branch with the same profile. Each kept its pick and replied twice in the same conversation. Codex's own logs show Fast and High on every turn.
  • New chats use the installed list and its default. With nothing picked, Claude showed the 5 installed models and defaulted to Opus (1M context) Med. Codex showed all 8 installed models and defaulted to GPT-6.1-Sol Low. Both replied, and Codex sent no effort or speed the user hadn't picked.
  • Claude updated in place while a chat runs (2.1.280 to 2.1.302, same path). The running chat's picker switched to the 302 list and kept its saved sonnet[1m] High. The old 280 process still replied. After a real restart the 302 process replied as Sonnet 5.5 High.
  • Fast is per chat (STA-10001 fixed). Two Codex chats both ran Fast. Switching one to Standard made only that chat's next turn run Standard, per Codex's own logs.

Windows (a484565): the same upgrade, in-place update and STA-10001 flows passed. A project-configured default (Haiku High) showed before Send and was the model that ran. OpenCode used the same non-default model and list as on main, with real replies on both builds.

Not run: Grok (no sign-in on the QA machines) and Pi (main's version check refuses the published Pi, tracked in STA-11559). This PR doesn't change Grok, OpenCode, OMP or Pi code. Phone wasn't tested because no phone rig was available. Real agent config files had the same hashes before and after each run, except in the last shared-machine run, where Codex and Claude config files on the M4Air changed during the run but contained nothing from the test copies (only other worktrees' trust entries).

Main, before the upgrade This branch, after the upgrade and restart
m4air-final-r1-main-codex-fast-reply.png m4air-final-r1-branch-codex-fast-after-upgrade-replies.png

Existing Claude chat on Opus (1M context) after the upgrade:
m4air-final-r1-branch-claude-opus1m-after-upgrade-replies.png

New chats show the installed list and its default:
m4air-final-r2-branch-claude-new-chat-installed-picker.png
m4air-final-r2-branch-codex-new-chat-installed-picker.png

Claude updated in place: the running chat shows the 302 list and keeps its saved pick:
m4air-final-r3-branch-claude-inplace-update-302-picker.png

Fast stays per chat: one chat switched to Standard, the other still Fast:
m4air-final-r4-branch-codex-c-standard.png
m4air-final-r4-branch-codex-d-still-fast.png

Tracked in STA-10947.

Author: Brennan Benson (X: @BrennanKB5)

@brennanb2025
brennanb2025 marked this pull request as draft October 17, 2026 20:19
@brennanb2025
brennanb2025 marked this pull request as ready for review October 17, 2026 20:19
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

The change updates model-catalog discovery and storage across ACP, Claude, Codex, and Pi. Catalog observations include workspace scope, completeness, configured choices, and effort-support metadata. Structured-session reads and writes now distinguish clients that support coherent catalogs from legacy clients. Shared and client-side option handling preserves selected values when inventory is unknown, and desktop, web, and mobile picker behavior is updated.

Priority: ⬆️ High

Merge Risk: 🟠 High · up to aed39

This change reworks how Claude and Codex model choices are discovered and shown across desktop and mobile. CI currently fails on a lint error. Several picker issues remain:

  • A stale effort level can be shown after a change.
  • The mobile model pill can be tappable but do nothing.
  • Some chats that require a model can be rejected.

The author reports further unresolved stopped-chat and older-phone behavior. This is not ready to merge.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 38.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 120 functions across 99 files. (20 skippe… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly describes the main goal of keeping model choices coherent during Claude updates. It does not mention the related Codex and broader catalog-discovery changes, but it remains specific …
Description check Passed The description is detailed and covers the problem, changes, rationale, issue reference, visual proof, testing, compatibility, and known limitations. It does not reproduce every template heading or ch…
Full details: Title check

Explanation

The title clearly describes the main goal of keeping model choices coherent during Claude updates. It does not mention the related Codex and broader catalog-discovery changes, but it remains specific and relevant.

Full details: Description check

Explanation

The description is detailed and covers the problem, changes, rationale, issue reference, visual proof, testing, compatibility, and known limitations. It does not reproduce every template heading or checklist item, and the issue reference is given as STA-10947 rather than a Fixes # link, but the required information is mostly present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 38.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 120 functions across 99 files. (20 skipped: 20 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd9d3060-8b34-411a-8393-3e512f3f8141
📥 Commits

Reviewing files that changed from the base of the PR and between b9fa92b and 47f56a2.

📒 Files selected for processing: 95
  • mobile/src/session/mobile-structured-agent-session-rpc.ts
  • mobile/src/session/use-mobile-structured-agent-options.ts
  • mobile/src/session/use-mobile-structured-agent-session.ts
  • mobile/src/session/use-mobile-structured-option-surface.ts
  • mobile/src/session/use-mobile-structured-send-controller.ts
  • mobile/src/session/use-mobile-structured-send-with-outcome.ts
  • mobile/src/transport/mobile-runtime-client-capabilities.ts
  • src/main/acp/acp-model-catalog-probe.ts
  • src/main/acp/acp-structured-host-configured-default.test.ts
  • src/main/acp/acp-structured-host-live-listing.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/acp/acp-structured-options.ts
  • src/main/claude/claude-model-catalog-probe.test.ts
  • src/main/claude/claude-model-catalog-probe.ts
  • src/main/claude/claude-structured-catalog-listing.ts
  • src/main/claude/claude-structured-configured-default.test.ts
  • src/main/claude/claude-structured-effort-default-at-rest.test.ts
  • src/main/claude/claude-structured-model-catalog.ts
  • src/main/claude/claude-structured-session-options.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/claude/claude-structured-spawn-options.ts
  • src/main/codex/codex-app-server-session.ts
  • src/main/codex/codex-configured-launch-defaults.ts
  • src/main/codex/codex-model-catalog-probe.test.ts
  • src/main/codex/codex-model-catalog-probe.ts
  • src/main/codex/codex-structured-acquire-catalog.ts
  • src/main/codex/codex-structured-background-catalog.ts
  • src/main/codex/codex-structured-catalog-entry.ts
  • src/main/codex/codex-structured-model-catalog.ts
  • src/main/codex/codex-structured-service-tier.test.ts
  • src/main/codex/codex-structured-session-acquire.ts
  • src/main/codex/codex-structured-session-adapter.test.ts
  • src/main/codex/codex-structured-session-options-catalog.test.ts
  • src/main/codex/codex-structured-session-options.test.ts
  • src/main/codex/codex-structured-session-options.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/ipc/desktop-renderer-runtime-capabilities.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-discovery-freshness.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-fingerprint.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-learned-default.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-listing-waiters.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-prewarm.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-process-observations.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-saved-only-read.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service-contract.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-unavailable.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-orchestration.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-launch-permission.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-model-catalog-scope.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-option-intent.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-outgrown-child.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-child.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started-catalog.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host.test.ts
  • src/main/pi/rpc-configured-default.test.ts
  • src/main/pi/rpc-model-catalog-probe.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-workspace-scope.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-policy.ts
  • src/main/runtime/rpc/methods/structured-agent-session-wire-contracts.test.ts
  • src/main/runtime/structured-agent-model-catalog-discovery.ts
  • src/main/runtime/structured-agent-model-catalog-first-frame.test.ts
  • src/main/runtime/structured-agent-model-catalog-wiring.ts
  • src/main/runtime/structured-agent-new-chat-effort-at-rest.test.ts
  • src/main/runtime/structured-agent-runtime-registrations.ts
  • src/main/runtime/structured-agent-session-runtime-model-catalog-lifetime.test.ts
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-option-state.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-send-options.ts
  • src/renderer/src/lib/structured-agent-session-launch-create-message.ts
  • src/renderer/src/runtime/host-model-catalog-snapshots.test.ts
  • src/renderer/src/runtime/host-model-catalog-snapshots.ts
  • src/renderer/src/runtime/structured-agent-session-client.ts
  • src/renderer/src/web/web-runtime-client-capabilities.ts
  • src/shared/agent-session-model-catalog-wire.ts
  • src/shared/agent-session-wire.ts
  • src/shared/electron-remote-runtime-client-capabilities.ts
  • src/shared/structured-agent-session-choice-catalog.test.ts
  • src/shared/structured-agent-session-choice-catalog.ts
  • src/shared/structured-agent-session-option-snapshot.ts
  • src/shared/structured-agent-session-option-view.ts
  • src/shared/structured-agent-session-options.ts
  • src/shared/structured-agent-session-surface-capabilities.ts
💤 Files with no reviewable changes: 3
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-learned-default.test.ts
  • src/main/codex/codex-structured-background-catalog.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-discovery-freshness.test.ts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0b388c7-d552-4bae-a9b7-603c1f1b7051
📥 Commits

Reviewing files that changed from the base of the PR and between abb286a and 1cce7a6.

📒 Files selected for processing: 26
  • mobile/src/session/use-mobile-host-model-catalog-upgrade.ts
  • mobile/src/session/use-mobile-structured-agent-options.first-frame.test.ts
  • mobile/src/session/use-mobile-structured-agent-options.ts
  • mobile/src/session/use-mobile-structured-session-option-stamp.ts
  • src/main/acp/acp-structured-host-configured-default.test.ts
  • src/main/acp/acp-structured-host-live-listing.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/acp/acp-structured-options.ts
  • src/main/codex/codex-structured-acquire-catalog.ts
  • src/main/codex/codex-structured-session-options.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service-contract.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/pi/rpc-configured-default.test.ts
  • src/main/pi/rpc-session.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-workspace-scope.test.ts
  • src/main/runtime/scripted-codex-model-catalog.test-fixture.ts
  • src/main/runtime/structured-agent-runtime-registrations.ts
  • src/main/runtime/structured-agent-session-integration.test.ts
  • src/renderer/src/components/native-chat/host-model-listing-waits.ts
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.test.tsx
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.ts
  • src/shared/host-model-listing-waits.ts
💤 Files with no reviewable changes: 1
  • src/renderer/src/components/native-chat/host-model-listing-waits.ts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 82638990-c7fe-4530-8831-c772650df97f
📥 Commits

Reviewing files that changed from the base of the PR and between 1cce7a6 and 7fc7902.

📒 Files selected for processing: 52
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/grok-model-catalog.ts
  • src/main/acp/acp-structured-host-live-listing.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/claude/claude-model-catalog-probe.test.ts
  • src/main/claude/claude-model-catalog-probe.ts
  • src/main/claude/claude-structured-catalog-listing.ts
  • src/main/claude/claude-structured-session-startup.ts
  • src/main/codex/codex-model-catalog-probe.test.ts
  • src/main/codex/codex-model-catalog-probe.ts
  • src/main/codex/codex-structured-acquire-catalog.ts
  • src/main/codex/codex-structured-catalog-entry.ts
  • src/main/codex/codex-structured-service-tier.ts
  • src/main/codex/codex-structured-session-adapter.ts
  • src/main/codex/codex-structured-session-options-catalog.test.ts
  • src/main/codex/codex-structured-session-options.test.ts
  • src/main/codex/codex-structured-session-options.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/codex/codex-structured-turn-start.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-listing-waiters.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-process-observations.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service-contract.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-mutations.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-launch-permission.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-message-options.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-outgrown-child.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-open-contract.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started-catalog.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-turns-options.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.ts
  • src/main/runtime/rpc/methods/structured-agent-session-prompt-response.ts
  • src/main/runtime/scripted-codex-model-catalog.test-fixture.ts
  • src/main/runtime/scripted-codex-transport.test-fixture.ts
  • src/main/runtime/structured-agent-model-catalog-wiring.ts
  • src/main/runtime/structured-agent-runtime-registrations.ts
  • src/main/runtime/structured-agent-session-integration.test.ts
  • src/main/runtime/structured-agent-session-runtime-model-catalog-lifetime.test.ts
  • src/shared/host-model-listing-waits.ts

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

@brennanb2025

brennanb2025 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status: parked on 6add463 (not ready to merge)

The problem this PR set out to fix. After Claude Code auto-updated from 2.1.280 to 2.1.302, running Claude chats in Chat UI quietly switched from opus[1m] to Sonnet. The newer CLI stopped listing opus[1m], and Orca treated "not in the refreshed list" as "no longer valid", so it replaced the chat's model. The small fix that keeps an unlisted chosen model shipped separately in #30436 and is already merged.

Why this PR is parked. Real QA on 6add463 confirmed the original incident is fixed here: the update flow, a fresh chat on High, and restart all passed. But it found a second bug of the same kind before the first Send. A Codex chat with no explicit model pick hides its saved Fast and effort controls after a restart, while main lets the user change them. The earlier effort-before-first-Send bug had the same cause. Orca's chat stores these choices per model, while the agent keeps them per conversation, so any chat whose model isn't known yet loses its controls.

The proposed fix showed Fast as read-only text, which is still worse than main. That fix was rejected, and a re-plan ruled to stop patching this branch. The work moves to a new PR from current main in which each conversation keeps its own model, effort and speed values, separate from the list of choices the agent offers.

Verified on 6add463.

  • Source review of the last change (the type move and the Grok test expectation): accepted.
  • Readiness and performance pass: no blocking findings. The saved-cache upgrade is safe, stored data stays bounded, nothing is written to disk on each read, models aren't listed repeatedly, and older clients still get model lists they can read.
  • Real QA on the M4Air: the Claude update flow, restart, Grok, Codex runs and OpenCode while running all passed. The real-Claude CLI suite was partial: three failures come from main's outdated model names in a test file this PR doesn't touch.
  • Full PR workflow green.

Not verified: old client or server versions, the phone, SSH and WSL, and a second account.

Deferred, for the replacement PR to consider.

  • When a Grok model switch times out but Grok applies it late, the chat shows the running model, but that choice is never saved.
  • If a Grok or OpenCode connection drops while models are loading, the whole read fails instead of showing the last known answer.
  • After a restart, if the chat's settings arrive before the model list, the chat briefly names a default model and then shifts.

This PR now conflicts with main and is not ready to merge; closing it is Brennan's call. No ready marker.

A newer CLI can omit a model that an existing chat still runs. Keep that chat's selected model and effort instead of replacing them from the available list.

Discover one model list per host, account, launch command and folder, refreshing after two minutes. Keep current values and the running model's exact effort choices with its chat. Show only the known effort when Claude supplies no matching menu.

Preserve older paired-client delivery and configured launch arguments. Make Codex use independent discovery and retain the established ACP and Pi paths.

Tracked in STA-10947.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b1dfbbb-2173-4b73-840f-c410d845b402
📥 Commits

Reviewing files that changed from the base of the PR and between 7fc7902 and aed3903.

📒 Files selected for processing: 73
  • mobile/src/session/MobileNativeChatSessionOptionPickers.tsx
  • mobile/src/session/MobileNativeChatSessionOptionRows.tsx
  • mobile/src/session/mobile-structured-agent-session-rpc.ts
  • mobile/src/session/use-mobile-host-model-catalog-upgrade.ts
  • mobile/src/session/use-mobile-structured-agent-options.ts
  • mobile/src/session/use-mobile-structured-option-surface.ts
  • src/main/acp/acp-model-catalog-probe.test.ts
  • src/main/acp/acp-structured-host-configured-default.test.ts
  • src/main/acp/acp-structured-host-live-listing.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/claude/claude-model-catalog-probe.test.ts
  • src/main/claude/claude-model-catalog-probe.ts
  • src/main/claude/claude-structured-catalog-listing.ts
  • src/main/claude/claude-structured-configured-default.test.ts
  • src/main/claude/claude-structured-effort-default-at-rest.test.ts
  • src/main/claude/claude-structured-options.ts
  • src/main/claude/claude-structured-retired-model.test.ts
  • src/main/claude/claude-structured-session-adapter-turns.test.ts
  • src/main/claude/claude-structured-session-options.ts
  • src/main/claude/claude-structured-session-startup.ts
  • src/main/claude/claude-structured-spawn-options.ts
  • src/main/codex/codex-model-catalog-probe.test.ts
  • src/main/codex/codex-structured-session-options-catalog.test.ts
  • src/main/codex/codex-structured-session-options.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service-contract.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-unavailable.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-launch-permission.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-message-options.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-option-models.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-outgrown-child.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started-catalog.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host.test.ts
  • src/main/pi/rpc-configured-default.test.ts
  • src/main/pi/rpc-session.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-workspace-scope.test.ts
  • src/main/runtime/scripted-codex-model-catalog.test-fixture.ts
  • src/main/runtime/structured-agent-model-catalog-first-frame.test.ts
  • src/main/runtime/structured-agent-model-catalog-wiring.ts
  • src/main/runtime/structured-agent-new-chat-effort-at-rest.test.ts
  • src/main/runtime/structured-agent-session-integration.test.ts
  • src/main/runtime/structured-agent-session-runtime-model-catalog-lifetime.test.ts
  • src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx
  • src/renderer/src/components/native-chat/NativeChatSessionOptionRows.tsx
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.test.tsx
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.ts
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.unavailable.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-option-state.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.first-frame.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-send-options.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-send-options.ts
  • src/renderer/src/lib/structured-agent-session-launch-create-message.test.ts
  • src/renderer/src/runtime/structured-agent-session-client.ts
  • src/shared/agent-session-wire.ts
  • src/shared/native-chat-session-options.ts
  • src/shared/structured-agent-session-model-catalog-application.test.ts
  • src/shared/structured-agent-session-option-snapshot.ts
  • src/shared/structured-agent-session-option-view.test.ts
  • src/shared/structured-agent-session-option-view.ts
  • src/shared/structured-agent-session-options.ts
💤 Files with no reviewable changes: 13
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started-catalog.test.ts
  • src/main/claude/claude-structured-configured-default.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-launch-permission.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.test.ts
  • src/main/runtime/structured-agent-session-runtime-model-catalog-lifetime.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-outgrown-child.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/runtime/structured-agent-model-catalog-first-frame.test.ts
  • src/main/claude/claude-structured-catalog-listing.ts

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

Restore the established ACP and Pi catalog route: newer listed models and qualified startup defaults stay visible, and genuine retained effort menus survive later reads. Keep exact-child Fast and Speed controls. Update the phone option contracts and the remaining stale expectations to the selection rules.

Tracked in STA-10947.
New chats read their workspace's own model list through the one shared request for that workspace, so a second chat in the same folder starts on the model and effort the agent actually runs there, and a slow first answer can no longer overwrite a newer list. A running Grok, OpenCode or Pi chat keeps its live model menu when an older shared list arrives later. Update the tests that still expected the replaced behavior.

Tracked in STA-10947.
A brand-new Claude chat now offers the selected model's effort levels before the first message, as it did before. Grok, OpenCode, omp and Pi again keep the list read from the installed agent apart from the list a running chat reports, and each newer list replaces only its own source. So a chat shows the model the agent is actually running with that model's own effort menu, and an effort change can no longer act on an older model's menu. Saved model lists on WSL are readable again without starting the agent.

Tracked in STA-10947.
…how Grok's late model answer

The phone app's type check no longer pulls in desktop-only catalog storage. The model-list code no longer reaches the saved-catalog file through a type import. When a Grok model change times out and Grok later confirms the model, the chat shows the model Grok actually runs.

Tracked in STA-10947.
@brennanb2025

brennanb2025 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Review loop finished on 67d307e. This head is the earlier reviewed design plus merges of main. Main's #30883 (Codex catch-up of turns made outside Orca) came in at 83807e6. #31628 (mobile picker selected-option visibility, a file this PR also changes) and #31581 (the CI fish 4 install) came in at 67d307e.

  • Review: host, client and architecture reviews each compared the whole mechanism with the common pattern. Every finding is fixed except these, each tracked in a ticket:
    • main has them too: STA-11527, STA-11529, STA-11567, STA-11574, STA-11620;
    • temporary differences: STA-11528, and STA-11619 (an effort or Fast pick that a verified installed list doesn't offer is still refused; removed with STA-11529 in this lane's next PR).
  • A Codex chat shows the turns made outside it #30883 merge: one conflict, in Codex session start. Main's catch-up step was kept before this PR's model-list lookup. The Codex test files covering that code pass, and CI is green on 67d307e.
  • Keep selected mobile options visible while locked #31628 merge: no conflict. A separate reviewer read both PRs' mobile picker changes and agrees both behaviours survive: installed choices, literal saved values with their own row for an unlisted saved model, controls locked while loading, refresh on open, and Keep selected mobile options visible while locked #31628's selected-option styling. CI's Mobile verify passes on 67d307e. The merges after 83807e6 change no agent code under src/main.
  • QA:
    • Codex was retested for real on 83807e6 (later merges changed no agent code), with 9 replies. An existing chat kept its pick and its history across the upgrade and two restarts. A new chat used the installed list's default. Fast stayed per chat (STA-10001, fixed).
    • Claude's real QA ran on 04ed370; the merge into 83807e6 changed no Claude code.
    • OpenCode parity with main was checked on Windows at a484565.
    • Details and screenshots are in the PR description.
  • Not run: Grok (no sign-in on the QA machines), Pi (blocked by main's version check, STA-11559) and phone (no rig). This PR doesn't change their code, and nothing was waived.

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