Skip to content

fix(native-chat): a new structured chat's model list comes from the machine that runs it - #25143

Merged
brennanb2025 merged 6 commits into
mainfrom
brennanb2025/rsc-prelaunch-models
Oct 4, 2026
Merged

brennanb2025 merged 6 commits into
mainfrom
brennanb2025/rsc-prelaunch-models

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​777 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​773
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​212 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​170

ELI5

When you open a new agent chat (the structured chat, not the terminal one), the model picker should list the models of the machine that will run the chat: your desktop, or a paired Orca server. Two things went wrong. On a machine that hadn't run a chat since it last started, the picker showed the desktop's built-in model list instead. And the first time a machine ever listed models for an account, the picker never got the real list at all. You could pick a model that machine doesn't have, and the chat refused it with an error toast when it started.

Now the picker asks the right machine even if it has run no chat yet. If that machine is still listing its models for the first time, the picker is greyed out for those few seconds and then shows the real list.

What Changed

What you saw before

  • Open a new Claude or Codex structured chat on a paired server that restarted and has no saved chats (or on your own desktop in the same state). The picker shows the desktop's built-in model list.
  • Pick a model from it that the server's account doesn't have: the pick is held, then refused with a toast once the chat starts.
  • The real list appears only once the agent attaches or its process starts.
  • The first time a machine lists models for an account, it answers "don't know yet" and starts listing in the background. The picker never asked again, so the built-in list stayed until the running agent reported its own.

What you see now

  • The picker lists the running machine's saved models as soon as the chat tab opens, whether or not that machine has run a chat since it started.
  • If that machine has never listed models for the account, the model picker keeps showing the current model name but can't be opened for those few seconds. Then it shows the machine's real list. You can't pick a model the machine lacks, so there's no "model not available" toast at start.
  • Once a machine has listed models, later new chats get the list straight away: the picker never greys out.
  • Typing /model <name> during that wait shows the existing "Could not apply model" message. A bare /model opens nothing until the list arrives.
  • You can still send your first message during the wait; the chat starts with the machine's own default model.
  • If the listing fails or times out, the picker comes back with the built-in list, as before.

Mechanism

  1. The read builds the host for structured chats. agentSession.modelCatalog (the read behind the picker) used the gate that refuses when the host's structured-session service isn't built yet. It answered "service disabled" until a chat was created or saved chats were restored at startup. Now a read that names a chat (structured chats always do) builds the service, the same way its neighbour agentSession.options already does. The terminal-backed chat's read names no chat, so it keeps the old non-building gate: a desktop that only uses terminal-backed chat never opens the structured-session journal.
  2. The host waits for its own listing. With no saved list for the account, the host starts (or joins) one background listing. It answers the picker's first read at once with unknown plus a new optional listingInProgress: true. The picker then sends one more read with a new optional waitForListing: true. The host awaits that same listing and answers with the real list, or unknown if it failed. That second read gets a 90 s client timeout, above the slowest listing: Claude is about 80 s worst case, 85 s on Windows with a fallback shell. The at-rest options read never waits.
  3. One waiting read per chat. The waiting read belongs to the chat, not to one render of the picker. Re-opening the tab, the chat attaching, or sending a message joins the read already in flight instead of sending another. Model-list reads to a paired server also run in the queue lane already used for other calls that wait on slow host work, so even many chats opened during one first listing never hold up sends or interrupts to that server. The answer is applied before the hold lifts, so the picker never flashes the built-in list in between.
  4. The picker hold is derived. The model picker is disabled while that chat's waiting read is in flight and no running agent has reported its own list. It's never disabled just because an ordinary read is pending, so it doesn't flicker on normal opens. The disabled state lives only in the desktop's view of the options; it isn't sent anywhere.
  5. Custom launch commands. The terminal-backed chat on this desktop has a shortcut that reads the same saved list instead of running the agent's CLI to list models. Because step 1 makes that list available more often, the shortcut is now skipped when you've set a custom launch command for the agent. The saved list describes the built-in binary; the CLI listing honors your command.

Why

The list was already requested from the right machine; the request was refused or answered "not yet", and nothing ever asked again.

Alternatives considered:

  • Re-read from the picker on a timer (1 to 30 s). This PR's first version did that. Rejected: it stands in for a signal the host already has (the listing's own completion). It could show the list up to 30 s late, and every re-read could start another listing. The common pattern waits on the host's listing instead.
  • Push "the list changed" to open pickers. The common pattern does this for refreshes of an already-saved list. A brand-new chat doesn't need it once the host waits on its first listing. Pushing refreshes is a separate follow-up (below).
  • Build the service when the server answers "can this machine run a structured chat?". Rejected: that check decides whether a chat opens at all, and it would then depend on the chat journal opening.
  • Have one read wait without the listingInProgress answer first. Rejected: the picker could then only grey out on "a read is pending", which flickers on every normal open. Older servers would also refuse the unknown parameter, because the params schema is strict.

Differences from the common pattern:

  • Sending isn't blocked during the first listing. Intended: a send during the wait carries no unverified pick (the picker is disabled), so the chat starts with the machine's own default and can't hit the refused-model toast.
  • No push when an already-saved list is refreshed in the background. Temporary: an open picker keeps the list it was given until reopened. Follow-up: carry a catalog-changed event on the existing per-server status stream (capability-negotiated).
  • No "Loading" text on the greyed picker. Intended: the picker keeps the current model name and is disabled, which matches the common pattern's quieter variant. No new copy is added.

Not in this PR (follow-ups, terminal-backed chat only):

  • One model-list cache per paired server is shared by that server's native, SSH and WSL worktrees, and is settled after its first listing.
  • This desktop's custom agent path is forwarded to a paired server's model listing, where it usually doesn't exist.
  • A paired server's authoritative listing (agents whose listing replaces the built-in one) can retire this desktop's own saved default model.

Compatibility (clients and servers update independently):

  • Newer desktop, older server: the server never sends listingInProgress, so the desktop never sends waitForListing (the server's strict schema would refuse it). Behaviour is as before: the built-in list stays until the chat attaches.
  • Older desktop, newer server: it ignores the new field, and its one read is now answered instead of refused.
  • Mobile doesn't call this read.

Linked Issue

N/A (maintainer follow-up from the remote structured chat work).

Visual Proof

Live check on macOS: a paired server and a desktop, each a separate isolated Orca built from this branch (4256aed), with a stand-in claude whose model listing takes 8 s and returns two models the desktop's built-in list doesn't have ("QA Host Only", "QA Host Alt").

While the server lists its models for the first time: picker greyed, label unchanged After: the server's own models
picker disabled during the first listing model menu lists the server's models
Message sent during the wait: the chat starts and answers, picker shows the server's model Second new chat (list already saved): picker never greyed
reply after sending during the wait warm picker

/model typed during the wait opened nothing then or later. A later /model opens the server's list:

model menu after the wait

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Each new or changed test was confirmed to fail with its part of the fix reverted (33 such revert checks across the rounds).

  • agent-model-catalog-service.test.ts: with no saved list, the first read answers listingInProgress and starts one listing. A waiting read joins that same listing (one listing process) and answers with the list, or unknown on failure. No wait or flag while a recent failure is still in its retry window, or when there is no lister. A saved but aged list is served at once.
  • agent-session-wire/structured-agent-session-options-read.test.ts (new): the at-rest options read answers even while a listing never finishes.
  • structured-agent-session-options-read.test.ts: a read naming a chat builds the service and answers. A read naming no chat (terminal-backed discovery) doesn't build it. waitForListing is passed through.
  • native-chat-session-option-enrichment.test.ts: a local terminal chat with a custom launch command lists through the CLI, not the saved list.
  • use-host-model-catalog-upgrade.test.tsx:
    • a warm read is one request and never greys the picker;
    • the flag leads to exactly one waiting read, and the list lands;
    • the picker is released on failure, timeout or the running agent's own list;
    • no follow-up read against an older server;
    • attach, hide/show and remount join the wait in flight;
    • another chat is neither held nor answered;
    • a commit-by-commit check shows no frame with the built-in list enabled between the wait and the host list.
  • NativeChatSessionOptionPickers*.test.tsx: the model pill is disabled while the list is pending. With the real menu component: a /model during the wait never opens the menu later or steals focus, and a later /model opens it.
  • structured-agent-session-client.test.ts: model-list reads get the 90 s timeout; other methods keep the default.
  • runtime-rpc-call-queue.test.ts: 8 in-flight model-list reads to one server don't block a send to it.

Also ran every importer of the changed modules, all structured-session RPC method suites, and the cross-version agent-session wire suite (all pass). pnpm tc:node, pnpm tc:web and pnpm run check:code-quality:changed pass.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH / remote: the host waits on its own listing, so this works the same for a paired server's native and SSH workspaces. A chat pinned to WSL has no host-side lister: it answers plain unknown, the picker is never greyed, and behaviour is as before.
  • Folder workspaces: unaffected (the read is per account, not per git worktree).
  • Model-list reads to a paired server share the long-wait request lane with workspace deletion, so a burst of slow deletions on one server can delay its model-list reads (not sends).
  • Mobile: no change.

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)
  • 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 (or CI will cover; local preferred)

…ost that runs it

agentSession.modelCatalog builds the structured-session host like agentSession.options,
so a host with no saved chats since it started answers instead of refusing. When the
host answers unknown because its first listing runs in the background, the picker
re-reads on a bounded schedule until that listing lands. Local terminal-backed chat
skips the structured catalog when a custom launch command is configured.
…e-reading on a timer

A new structured chat's picker read the host catalog once; on an account the
host had never listed, the answer was "unknown" while a background listing ran,
and the client re-read on a 1-30 s schedule. Replace the schedule with the
host's own completion signal:

- The host answers a cold read with `listingInProgress: true` (new optional
  field) once it has started or joined that listing. A read that passes the new
  optional `waitForListing` param awaits the same joined listing and answers
  with it, or a plain "unknown" if it failed. The at-rest options read never
  waits. A host that predates the field never sends it, so the client never
  sends the param to a host that would refuse it.
- The picker reads once per open and attach; after the host's report it sends
  one waiting read, with a 90 s client timeout above the slowest listing.
  While that read is out, the model pill keeps its label but cannot open or be
  set (typed /model included). An answer, failure, timeout, hide, attach or
  the provider's own list releases it.
- `agentSession.modelCatalog` builds the structured-session host only for a
  read that names a session (a structured chat). Terminal-backed chat's
  session-less read keeps the non-building gate, so a desktop that never runs
  structured chat never opens the session journal.
…enu open

The waiting catalog read was owned by one run of the picker's effect. Attach
(a new fence), hide/show or a send re-ran the effect: the cleanup released the
model picker onto the built-in list for a round trip, and the new run sent a
second waiting read while the first, which cannot be withdrawn, kept a remote
call slot until the listing ended.

The waiting read now belongs to the chat (runtime target + agent + session):
a small registry keeps one in flight per chat, every re-run or remount joins
it, and the entry is deleted when the read settles. The picker hold is derived
from that entry being in flight, so it lasts across attach and hide/show and
ends when the read settles, the provider reports its own list, or the pane
switches to another session. Answers still pass the stale and record checks.

A bare /model typed while the list loads no longer opens the model menu by
itself when the list lands: the menu stays keyed on the request, and only its
initial open is suppressed while pending, so the request is spent shut and the
end of the pending period never remounts it.
…host list

When the waiting catalog read settled in the chat that started it, the
registry dropped its entry and told subscribers first, and the host list was
applied a few microtasks later. React committed once with the picker enabled
on the built-in list, then again with the host's list.

Joiners now hand the registry their apply callback, and the registry runs
every joiner (with the answer, or nothing when the read failed or timed out)
before it deletes the entry and notifies. The release and the list land in one
commit. An effect cleanup leaves the wait instead of flagging itself stale.
A model catalog read that waits on a host's first listing replies only when
that listing ends, yet it took one of the 8 foreground call slots for its
server. Enough chats opened during one cold listing would stall that server's
sends and interrupts until a wait settled.

agentSession.modelCatalog now joins worktree.rm in the long-wait lane: same
concurrency, counted apart from the foreground calls. The queue classifies by
method only, and a warm catalog read answers at once, so the whole method
moves.
@brennanb2025

brennanb2025 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status — ready for review (head 5558107614430ca842d7d16511ae7dde816ff22b: current origin/main merged in on top of the reviewed 4256aed9806d, no conflicts, typechecks and targeted tests re-run, CI green)

The problem. When you opened a new Claude or Codex structured chat, the model picker could show the desktop's built-in model list instead of the list of the machine that runs the chat. That happened on a paired server that hadn't run a chat since it started, and on the first chat ever for an account on a machine. You could pick a model that machine doesn't have, and the chat refused it with a toast when it started.

What changes for you. The picker now always asks the machine that will run the chat. The first time that machine lists models for an account, the picker keeps its label but is greyed out until the list arrives, usually a few seconds. Then it shows that machine's models. After that, new chats get the list straight away and the picker never greys out. A message you send during the wait starts the chat with the machine's own default model.

How the review went. Four rounds, plus a pre-release checklist.

  • The first version re-asked the server on a timer (1 to 30 s). That was replaced: the server now waits on its own model listing and says when one is running, so the picker makes at most one extra request and needs no timers.
  • Fixed along the way:
    • a desktop that only uses terminal-backed chat no longer opens the structured-chat history database;
    • the built-in list is no longer pickable while the real list loads;
    • one waiting request per chat, instead of a new one each time the chat re-rendered;
    • the model menu no longer opens by itself after a /model typed during the wait;
    • no flash of the built-in list when the wait ends;
    • waiting requests no longer use the request slots that sends and interrupts need;
    • a test that failed the web typecheck.
  • Each fix has tests that fail with the fix reverted (33 such checks). tc:node, tc:web, the changed-code quality gate and CI pass.

Deferred (low impact, not fixed here).

  • A bare /model during the wait opens nothing but doesn't say so. /model <name> during the wait shows the existing "Could not apply model" message, which reads like that model was rejected.
  • A model-list request that was answered quickly still carries the long 90 s timeout. This only matters for a server that accepts requests and never answers.
  • An already-open picker isn't updated when a saved list is refreshed in the background (follow-up: push catalog changes on the existing per-server status stream).
  • Follow-ups for terminal-backed chat are listed in the PR body.

Verified.

  • Unit and component tests for the server's wait, the request gating, the one-wait-per-chat behaviour, the picker's disabled state and the menu (real menu component), each confirmed to fail with its fix reverted.
  • Mixed versions by reading the code and running the cross-version wire suite:
    • a newer desktop never sends the new parameter to an older server, so nothing changes there;
    • an older desktop ignores the new field.
  • Live, on macOS, with a paired server and a desktop, each an isolated Orca built from this branch, and a stand-in claude (8 s listing, two models the desktop lacks):
    • first listing: picker greyed, then the server's models, then a reply, with no refusal toast;
    • second chat: picker never greyed (119 samples over 2 s);
    • message sent during the wait: the chat answered and the built-in list never appeared;
    • /model during the wait: no menu opened then or later, and focus stayed in the composer;
    • terminal-only desktop: no structured-chat history database was created.
    • Screenshots are in the PR body.

Not verified.

  • A real Claude or Codex account's listing: the live run used a stand-in CLI.
  • Windows, Linux, SSH and WSL live: covered by unit tests and code reading only.
  • The live run was on a shared Mac alongside other test rigs. The first test machine was unreachable or busy for a while, so timing samples may be noisy.
  • One screenshot meant to show the composer with /model typed during the wait was captured after the wait. That step is backed by the recorded page state, not by the image.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 4, 2026 10:14

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor note on the new timeout and a couple of nits.

Reviewed changes

  • Host builds for a named chat's read — agentSession.modelCatalog now uses requireInstalledStructuredHost when the params name a sessionId, so a new chat's picker can read before anything built the host; a session-less terminal-backed read keeps the non-building gate.
  • First-listing handshake — agent-model-catalog-service.ts answers { origin: 'unknown', listingInProgress: true } when it starts or joins the account's first listing, and a waitForListing: true read awaits that same joined listing (adding the optional params/result fields on the wire).
  • One waiting read per chat — new host-model-listing-waits.ts shares a single waiting read across every mount/effect run, and use-host-model-catalog-upgrade.ts derives awaitingListing from it via useSyncExternalStore.
  • Picker hold is derived — the model descriptor is marked settable:false, choicesPending:true while the wait is in flight and no live catalog exists, so the pill keeps its label but cannot open; a typed /model is refused.
  • Queue lane — agentSession.modelCatalog moved into the long-wait lane beside worktree.rm, so waiting reads don't hold foreground slots.
  • Custom launch command — the terminal-backed local shortcut to the host catalog is skipped when a custom TUI command is set, so the CLI listing (which honors it) runs instead.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment on lines +88 to +93
const STRUCTURED_AGENT_SESSION_METHOD_TIMEOUT_MS: ReadonlyMap<string, number> = new Map([
['agentSession.conversationCommand', 195_000],
// A waiting catalog read lasts as long as the host's listing: Claude's is 60 s, after up to 15 s
// for an account switch to settle and 5 s of login-shell environment.
['agentSession.modelCatalog', 90_000]
])

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.

The 90 s timeout is keyed by method, so it applies to every agentSession.modelCatalog call, not only the waitForListing read the PR describes. On an environment target callRuntimeRpc forwards timeoutMs into the compatibility status.get probe (runtime-rpc-client.ts:72), so a black-holed server now stalls the first warm read ~6× longer (90 s vs the default 15 s); and for kind: 'local' it drops timeoutMs entirely (runtime-rpc-client.ts:83-85), so the deadline is remote-only despite the desktop being the common case.

Technical details
# Method-keyed timeout is broader than intended

## Affected sites
- `src/renderer/src/runtime/structured-agent-session-client.ts:88-93` — map keyed only by method name.
- `src/renderer/src/runtime/runtime-rpc-client.ts:72-76` — `timeoutMs` flows into `ensureRuntimeEnvironmentCompatible`.
- `src/renderer/src/runtime/runtime-rpc-client.ts:83-85` — local branch ignores `options.timeoutMs`.

## Required outcome
- Only the read that actually waits on a listing needs the extended deadline; a warm read and the compatibility probe can keep the default.

## Suggested approach (optional)
- Select the timeout from `params` (e.g. `waitForListing === true`) rather than method alone, or apply it only to `callRuntimeEnvironmentWithRevision` and not the compatibility options.

## Open questions for the human (optional)
- Is extending the compatibility probe to 90 s intentional (mirroring the existing 195 s `conversationCommand` behavior)? If so, the local path silently having no deadline may still be worth a comment.

@pullfrog pullfrog 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.

ℹ️ No new issues in the delta — the prior timeout note remains open.

Reviewed changes (delta since 4256aed)

  • Merge of origin/main (5558107) — the only commit added since the prior review. It brings main's OpenCode transcript-reader changes (src/main/native-chat/transcript-opencode*) into the branch and touches none of this PR's 22 changed files, so no authored code changed and no conflict resolution affected the model-catalog work.

The one minor note on method-keyed timeouts from the prior review still applies; nothing else changed.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 11f6b84a-75f7-469f-acaf-90438eea0ff2
📥 Commits

Reviewing files that changed from the base of the PR and between 8c61730 and 5558107.

📒 Files selected for processing (22)
  • 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.test.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/renderer/src/components/native-chat/NativeChatSessionOptionPickers.menu-request.test.tsx
  • src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.test.tsx
  • src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx
  • src/renderer/src/components/native-chat/host-model-listing-waits.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.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/renderer/src/components/native-chat/use-structured-agent-session-options.ts
  • src/renderer/src/runtime/structured-agent-session-client.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/rpc-contract/structured-agent-session-params.ts
  • src/shared/runtime-rpc-call-queue.test.ts
  • src/shared/runtime-rpc-call-queue.ts
  • src/shared/structured-agent-session-options.ts

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


📝 Walkthrough

Walkthrough

The host catalog read can report an initial listing in progress and optionally wait for that listing. Renderer reads share in-flight waits, and model choices remain unavailable until the host list arrives. Model catalog calls use a long-wait queue lane and a dedicated timeout. Local agents with an explicit TUI launch command use runtime CLI discovery instead of the host catalog.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 55581

This change makes structured-chat model pickers wait for the host's own model list instead of showing the built-in one. One open concern remains: the longer timeout may apply to quick catalog reads too, which could make an unresponsive remote server stall the first model read for longer than intended. The impact is bounded and the author can address it with a small change.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 55581

The change coordinates waiting on the selected machine and prevents premature choices. No privilege increase was demonstrated, and discovery has deadlines and shared-work controls. Access-control coverage remains incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed operation can initialize the addressed runtime's host and initiate account-scoped discovery using that machine's configured launch environment. Its immediate exposure is therefore host initialization, catalog metadata, and discovery-process resources; the inspected request does not supply credentials or an arbitrary account-home path.

Trust Boundaries and Controls

  • observed — Lazy installation checks structured-session capability before creating the host and then passes through the ordinary host gate. This is a negotiated feature gate, not proof of authentication or per-session authorization. The inspected catalog handler does not pass caller ownership to the catalog service; the intended authorization scope remains unresolved.

Resilience and Maintainability Implications

  • observed — Probe rejection clears shared in-flight state and records failure backoff. Both production probes reject empty results. Codex discovery requests a 15-second deadline; Claude discovery has a 60-second deadline and output limit that invoke process termination. Renderer waits release on success or rejection. These bounds counter indefinite-wait concerns, although a client disconnect does not itself cancel shared discovery.

Hardening Proposals

  • proposed — Document whether catalog reads intentionally grant host-wide access or require session ownership, and make the corresponding authorization control explicit at the RPC boundary. This addresses an unresolved policy question, not a verified vulnerability introduced by this PR.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 22 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: new structured chats get the model list from the machine that runs them.
Description check ✅ Passed The description covers the required sections with detailed user impact, implementation, rationale, linked-issue status, visual proof, testing, compatibility, and checklist results. The AI Disclosure s…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

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