Skip to content

fix(acp): start chats for agents that report no model - #26587

Merged
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/omp-windows-chat-start
Oct 9, 2026
Merged

brennanb2025 merged 7 commits into
mainfrom
brennanb2025/omp-windows-chat-start

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​525 $\color{#cf222e}{\Huge{\mathbf{−}}}$​34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​491
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​97 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​84

ELI5

What broke: some agents open a chat without saying which model they're using. OMP does this when it has no model or provider set up. Orca stored that missing model as an empty name. Its own save check then rejected the empty name, so the user saw "Chat could not be started", even though OMP had opened the conversation.

What's different now: a chat from an agent that reports no model starts normally and shows no blank model control.

What Changed

Both the live agent options reader and the closed-chat reader represent an unreported model as absent. The shared save path also omits absent or empty model names supplied by other agents. Saved-record validation stays strict. Models reported later are saved at the existing session-opening and confirmed-option-change points.

Updated desktop clients advertise support for options without a model. An older paired client receives the existing quiet unsupported response for that options read until a model is reported. Explicit model reports keep their existing behavior.

Why

Fixing the reader removes the invented value before any consumer sees it. One shared save guard handles other agents without accepting invalid records or inventing a placeholder model.

Intended difference: an older paired client cannot discover thinking settings and supported controls while a session has no reported model. This prevents its model picker from crashing. Chat creation and sending messages remain available; discovery resumes when a model is reported.

Linked Issue

Found while checking OMP native chat on Windows. The missing answer in the last screenshot came from a separate, pre-existing bug: the reasoning and the answer can share one message identifier. It was fixed in #26658, which is now merged.

Visual Proof

Before: starting OMP showed “Chat could not be started.”

Windows OMP startup failure

After, with no reported model: the chat opens with a usable composer and no blank model control. Why there's no model here: the isolated test copy of Orca hides the user's GEMINI_API_KEY, and OMP gets its model from that key. So OMP genuinely had no model to report, which is exactly the case this PR fixes. A real user whose OMP has no model set up sees the same screen.

Windows OMP chat without a reported model

Final Windows build, with the key given to OMP at runtime: the chat starts and shows the real model, Gemini 3.1 Pro Preview, with High thinking effort.

Windows OMP chat with its real model

The same chat accepts one prompt. Its saved turn completes successfully, but the answer is missing because of the separate lost-answer bug that #26658 has since fixed. This screenshot proves startup, model reporting and prompt acceptance. The answer showing up was proven live in #26658's own testing, not re-run here.

Windows OMP accepted prompt

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

97 tests passed across the original 10 focused files, including the exact scrubbed Windows OMP response through the real reader and save checks, Grok/OpenCode missing-model cases, a real store write and reopen after a later model report, picker rendering, and mixed-version checks in both directions using released code. The real Claude command-line suites and effort-default test passed together: 23 tests in three files. After the second authorized main merge, 140 targeted tests in 15 files, queued Node/renderer/CLI typechecks, and all 22 pre-push checks passed. Every selected CI check completed successfully on final head ce07804a38af3c4c96aa1096b16d59fe348444d0, including Windows packaging and persistence, all five test shards, and cross-version compatibility. One unchanged Codex connection test timed out in the initial full-suite attempt; its 34-test file passed alone, and a single failed-job retry passed on the same commit. Skipped jobs are not counted as passes.

Windows high-spec verification used the real OMP 17.3.8 installation and a hidden app built from final commit 418b82d2df3fe498a8684b670cb1e5fd1f4c01e4. The real UI opened OMP, showed its model, and accepted one prompt; each click had a hit test. Wrapper use and the reported model were verified before sending. The missing answer is the separate pre-existing issue above. Later-model persistence is proved by the real-store write/reopen test.

The isolated test environment hides the user's GEMINI_API_KEY; that was a test-rig difference, not Orca losing the provider key. Direct agent-protocol and command-line checks isolated that difference. A wrapper obtained the user's key at runtime for OMP alone. No key value was written to a file, log, screenshot, or report, or forwarded through Orca's environment. No login or configuration was copied or manually edited.

No live macOS run was performed, as requested; regression evidence is the existing macOS OMP recordings and unit tests. No live SSH check is claimed.

Review

Fresh adversarial and independent architecture reviews passed; subsequent changes received fresh narrow reviews. Capacity-limited reviews ran as authorized fresh headless processes. Main fixed its session-host line limit in #26648. The authorized second merge keeps main’s extraction, removes this branch’s duplicate module, and leaves the host and provider-support files identical to main. A fresh reviewer confirmed all 20 startup-fix patches are unchanged. Final-head CI is complete and every selected check passed.

Related fixes, already merged: #26666 keeps an agent's own error details instead of a bare "Internal error", and #26658 fixes the lost answer. This PR changes neither.

Current head 4ee00118a2c is this branch merged with main. On that head, 19 CI checks passed, 15 were skipped and none failed.

Agent skill upstream boundary

  • Not applicable: this change copies no upstream skill-installer material.

Notes

No new saved fields, relaxed validation, dependencies, or execution-host assumptions. The capability check uses authenticated client capabilities and covers local and paired desktop readers; mobile does not advertise it. The hidden app exited normally. Fresh native process checks found no remaining or unverifiable owned app processes. The key broker and all recorded wrappers/OMP children exited, and a fresh native table verified their absence. Real Windows keybindings and the original reproduction database retained their original hashes. Agent-produced session/database/cache writes are recorded in the local ledger; evidence stays outside the clean temporary checkout. Never merged.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots are embedded above
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Final-head targeted tests, queued typechecks, static checks and selected CI jobs passed

@brennanb2025

brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Windows OMP opened its conversation, but Orca invented an empty model name when no model was reported. Saving that invalid value caused “Chat could not be started.” This change represents the missing model as absent in live and closed-chat readers, keeps one shared save guard, and leaves saved-record validation strict. Later model reports still use the existing save points and survive a real store reopen.

Intended difference: older paired clients quietly lose thinking-settings/control discovery until a model is reported, preventing a picker crash. Chat creation and sending remain available.

Final Windows high-spec proof: the chat starts, reports the real model (Gemini 3.1 Pro Preview), and accepts one prompt. The screenshot does not show an assistant answer. That is a separate, pre-existing message-identity bug, where reasoning and answer chunks share an identifier; it is being fixed separately. No reply-loss change is included here.

The test rig hid the user's GEMINI_API_KEY, which explained its earlier missing-model prompt failure. Direct protocol and command-line checks confirmed the difference. The corrected wrapper obtains the key at runtime for OMP alone; no value was written to evidence or passed through Orca's environment. No manual login/configuration change or credential copy was made.

Fresh adversarial, architecture and narrow reviews passed. Captured-response, Grok/OpenCode, rendered-picker, real-store and mixed-version tests passed, along with the required real Claude tests. After the second authorized main merge, all three queued typechecks, 140 targeted tests in 15 files, and all 22 pre-push checks passed. Main’s #26648 extraction is retained; this branch’s duplicate module is removed. The host and provider-support files match main exactly, and the fresh reviewer confirmed all 20 startup-fix patches are unchanged.

Merged current main on 10-09 at Brennan's request (head 4ee00118a2cea01fca1d17ea11f61cbd31efd1bf). Two conflicts in the session-options read were resolved by keeping both sides: main's new import beside this PR's, and this PR's per-agent test with the journal stub main's /clear change needs. Against main the diff is still only this PR's 20 files. A fresh review of the resolution found no issues. The main-process typecheck and 92 targeted tests passed locally. CI on the new head: 19 passed, 15 skipped (skipped are not counted as passes), none failed, including static analysis and typecheck and all five test shards. Earlier, on ce07804a38af3c4c96aa1096b16d59fe348444d0, initial shard 3/5 timed out in an unchanged Codex connection test; the isolated file passed all 34 tests, and one failed-job retry passed on the same head. Screenshots are embedded in the body. READY under the agreed startup/model/prompt-acceptance bar. No live macOS or SSH check is claimed; existing macOS recordings and unit tests supply the macOS regression evidence.

Deferred follow-up, P2: OMP's useful setup-error details are reduced to “Internal error.” The separate child draft #26666 preserves those details and names the agent while keeping its own next steps; this startup PR leaves error presentation unchanged.

The app exited normally; native checks found no remaining or unverifiable owned app processes. The runtime key broker and recorded wrappers/OMP children exited and were verified absent. Real keybindings and the original reproduction database hashes stayed unchanged. Agent-produced runtime writes are recorded locally. The live Windows check ran on ce07804a38af3c4c96aa1096b16d59fe348444d0; the main merge since then touched none of this PR's lines except one test stub. Final pushed head 4ee00118a2cea01fca1d17ea11f61cbd31efd1bf; final CI is classified above. No further Windows activation is planned. Never merged.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 8, 2026 19:11
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 42ddb69c-4612-48ac-ae2d-627d33803318
📥 Commits

Reviewing files that changed from the base of the PR and between cac7200 and 4ee0011.

📒 Files selected for processing (2)
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.ts

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


📝 Walkthrough

Walkthrough

Session-option reads now omit an absent model while preserving other reported options. The RPC checks whether a client supports model-less results. Desktop clients advertise that capability. Tests cover provider reports, persistence, picker rendering, and cross-version client behavior.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 4ee00

The change lets chats start for agents that report no model. Older paired clients cannot discover thinking settings until a model is reported, which is an intended tradeoff. No merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check Warning The description is detailed and covers the change, rationale, visual proof, testing, compatibility, and review status. However, the required Linked Issue section does not identify an issue for this PR… Add the issue link addressed by this PR in the Linked Issue section and complete the Fixes # entry. Keep the separate message-identity bug link as an out-of-scope reference if needed.
Docstring Coverage Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 21 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: allowing chats to start when agents report no model.
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.
Full details: Description check

Explanation

The description is detailed and covers the change, rationale, visual proof, testing, compatibility, and review status. However, the required Linked Issue section does not identify an issue for this PR; it only links to a separate pre-existing bug.

  • 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.

Resolves two conflicts in the session-options read: keeps both new imports in the RPC method, and keeps this branch's per-agent at-rest test with the journal context stub main's /clear change now needs.
@brennanb2025
brennanb2025 merged commit c586cce into main Oct 9, 2026
34 checks passed
brennanb2025 added a commit that referenced this pull request Oct 9, 2026
…ain)

Rebuilds #26561 on main now that #26416 is squash-merged. Same change as
before, re-applied onto what main has since:

- Every adapter answers acquire at spawn and reports `started` on protocol
  readiness with its real handle (Claude initialize, Codex thread, ACP
  session new/load plus restore, Pi session file plus restore). No bridge,
  no per-adapter phase or Stop opt-outs.
- Picks made while starting are intents applied model then effort before
  the start is accepted; rewind, goal, rewind recovery and compact wait for
  a proven start outside the session queue.
- One Stop rule: Stop ends the session for every agent (Codex: interrupt,
  up to 2 s for the turn to end, then close).
- Orchestration worker starts share one deadline; a send's answer copies
  its row; a re-attach during start keeps the start wait.

Integrated with main:
- ACP: the subagent-stop probe, child-work delivery and new/loaded origin
  move into the handshake; the sign-in rule (#26544) classifies a failed
  handshake; acpAgentName stays in acp-structured-agent-definitions.
- Codex: the session journal translator and account kind (#26407) reach the
  start step.
- Pi: the start choice (#26821) and the signed-out verdict (#26743) are read
  in Pi's start, so both exist when `started` is reported; commands follow.
- openWithAgent keeps main's pre-agent check and replay rule.
- A report with no model drops the saved one, as #26587 decided.
- The renderer re-reads a start's sign-in verdict once the start is proven.
@brennanb2025
brennanb2025 deleted the brennanb2025/omp-windows-chat-start branch October 13, 2026 23:29
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