Repository navigation
fix(mobile): start + menu, quick command and diff-note agents through agent.launch - #22954
Conversation
81e471b to
c196303
Compare
|
Review status: ready for review at What the review loops changed (8 loops plus a separate architecture review):
Phone QA (Android emulator, driven only through Not caused by this PR (for follow-up):
Minor UX, left as is: while a slow agent is still receiving review notes, the diff view's Send is greyed with no hint why. |
78b37d0 to
37d07b4
Compare
|
Status update: ready for review at
|
37d07b4 to
74191a3
Compare
74191a3 to
7081583
Compare
|
Status update: rebased onto
|
7081583 to
6a84346
Compare
|
| if (launched.promptDelivered === false) { | ||
| triggerError() | ||
| showToast(options?.initialPrompt ? NOTES_NOT_SENT_MESSAGE : AGENT_PROMPT_NOT_SENT_MESSAGE, 2400) | ||
| } else if (launched.promptDelivered && options?.initialPrompt) { | ||
| triggerSuccess() | ||
| showToast(options.successToast ?? 'Notes sent') | ||
| options.onPromptSent?.() | ||
| } else if (warning?.trim()) { | ||
| showToast(warning.trim(), 2400) |
There was a problem hiding this comment.
Prompt receipt hides host warning For a prompted launch, the delivery notice takes precedence over
warning. If the terminal is running but the host could not make its tab discoverable, the phone hides the host’s explanation and instructions for revealing it. Show the warning independently of the prompt-delivery notice.
Knowledge Base Used: Agent integrations and hooks
There was a problem hiding this comment.
ℹ️ No critical issues — two narrow, non-blocking observations on where the new notes hold does and doesn't reach.
Reviewed changes
- One launch path for agents — the "+" menu, agent quick commands, and diff-notes "New agent session" now call
agent.launchReplay(new-tab-agent-host-launch.ts), letting the host pick chat vs terminal from the chat-default setting; the phone no longer predicts anagent-session:<id>tab id. - Pre-named tabs — each launch mints a
paneKey/sessionIdreservation and arms aPendingSessionSelectionbefore the request, so the phone lands on the tab when it is listed (and frees the "+" lock) rather than when the host replies after prompt delivery. - Delivery receipts — notes are marked sent only when the host reports delivery; a lost reply after the tab landed downgrades to "started but couldn't confirm the prompt/notes" instead of "may not have started".
- Single pending selection —
pendingActiveSessionTabIdRef+pendingActiveTerminalHandleRefcollapse into onePendingSessionSelection;creatingTerminalRefbecomes an id-string lock (terminal-create-lock.ts) released only by its own launch. - Notes hold —
sendingDiffCommentIdsholds notes from the tap until the launch reply so the same notes can't start a second agent on the session screen. - Wire compat —
paneKey/sessionIdare existing optional fields; hosts older than v1.4.206 fall back to today's paths, andagent-launch-params.test.tspins that an older schema drops them rather than refusing.
ℹ️ The notes hold is per-screen, so the review screen can still start a second agent
The hold added in use-mobile-session-diff-comments.ts lives in a hook-local useRef, while the review screen's "Send Unsent Notes → New Agent Session" launches through createTerminalAndSend (use-mobile-diff-review-send-actions.ts:123), whose only guard is its own agentLaunchInFlightRef. If the user opens the review screen while a session-screen launch is still delivering the same notes, the notes are still unsent on the host record, so the review screen offers them again and a second agent can start — the outcome this PR set out to prevent. This is narrow (it requires navigating mid-launch, within the 60s/90s prompt wait) and the PR text only claims the guarantee for the session screen and for the review screen's own launch, so it may be intended scope; worth confirming whether the two holds should be shared.
Technical details
# Cross-screen notes hold gap
## Affected sites
- `mobile/src/session/use-mobile-session-diff-comments.ts:35` — `sendingDiffCommentIdsRef` is a hook-local ref; unmounted when the session screen routes away.
- `mobile/src/session/use-mobile-diff-review-send-actions.ts:123` — `createTerminalAndSend` consults only `agentLaunchInFlightRef`, never the session hold.
- `mobile/src/components/MobileDiffReviewDrawers.tsx:121` — the review screen's "New Agent Session" action.
## Required outcome
- The same host-persisted notes cannot be sent to two agents from two entry points while either is in flight. Either share the sending-id set across the session and review surfaces (e.g. a store/module-level registry keyed by comment id), or have the review screen read the same hold.
## Open questions for the human
- Is cross-screen sharing in scope, or is the cross-surface composition deliberately out of scope for this PR?ℹ️ On hosts without agent.launch.v2, the hold lifts before terminal.send settles
When the host is older than v1.4.206, launchNewTabAgentThroughHost returns false and the notes path falls back to legacy sessionTabCreateTerminal, whose terminal.send for initialPrompt is fire-and-forget (use-mobile-session-terminal-create-actions.ts:207). handleCreateTerminal therefore resolves before onPromptSent fires, so sendDiffNotesToNewAgent's finally clears the hold during the terminal.send round-trip, and a second Send tap in that window re-offers the still-unsent notes. This is a one-RTT window on older hosts only, and the modern path (awaiting the host reply) is correct, but it is the same stated guarantee.
Technical details
# Legacy-host hold release
## Affected sites
- `mobile/src/session/use-mobile-session-terminal-create-actions.ts:206-239` — `terminal.send` for `options.initialPrompt` is `void`ed, not awaited; `onPromptSent` runs in its `.then`, after `handleCreateTerminal` returns.
- `mobile/src/session/use-mobile-session-diff-comments.ts:180-188` — `finally` clears the sending ids when `launch()` resolves.
## Required outcome
- On the legacy path the hold should outlive the `terminal.send` round-trip (await it, or clear the hold from `onPromptSent`/the send's settle rather than from the create's return).
## Open questions for the human
- Whether this legacy-only window is worth covering before the COMPAT branch is removed.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
… agent.launch The session screen's + menu, agent quick commands and diff notes' New agent session now ask the host to start the agent with agent.launchReplay, so the host picks chat or terminal from the desktop's default and delivers any prompt. Hosts without the launch capabilities keep today's paths. The phone's pending tab choice is one value (a tab, a terminal by handle, or a launched surface) instead of two refs, and a launched chat is found by its session id in the next snapshot rather than a predicted tab id. A launched surface waits a bounded number of snapshots for its tab.
…s; drop test casts The corpus grows from 790 to 794 goldens; all four new ones replay identically.
The inline create error renders only in an empty session, so a host refusal (for example a disabled agent) from the + menu in a session with tabs showed nothing. Always toast the failure: the caller's own copy when it gave one, otherwise the host's reason.
…he host A launch carries no navigation, so the phone selected the new tab only locally while the host kept this device on the tab it had before. Leaving the session and coming back, or a reconnect that reset the screen, reopened that old tab. The "+" terminal path this replaced asked the host to select the tab for the caller. When a launched surface's tab lands in a snapshot, activate it for the caller exactly as a tap does. The resolver now names the landed tab in place of the unused `missed` flag. Route parity re-pinned for the new activation body, identity payload and strings.
…a blank pane The host publishes a launched tab before it replies, so the tab list the phone already holds usually has it by the time the reply arrives. The launch paths still waited for a refetch 500 ms later, leaving the phone on the old tab for that long after every launch. Read the tab list at once. On hosts without agent.launch, the chat path also unsubscribed the open terminal and cleared its handle before the chat's tab landed, while the old terminal tab stayed selected: a blank pane until the next tab list. Leave the open tab live until the chat lands, as the launch path does; applying that tab list tears the old terminal down. Route parity re-pinned for the two bodies.
…till replying A quick command or review-notes launch now waits for the host to deliver the prompt, which can take up to a minute. The launched tab shows up in the tab row well before that, so a user who tapped another tab meanwhile was pulled back onto the launched one when the reply arrived, and that pick was recorded on the host. The launch now remembers which tab the phone was on when it started and only takes focus if the phone is still there when the reply lands. Any move made in between, by a tap or by the computer navigating this phone, wins. Session route parity re-pinned for the handleCreateTerminal body only.
…t when it is listed A "+" menu, quick-command or review-notes launch now reserves its tab before it asks the host: a fresh pane key (tab and leaf UUIDs) and, for an agent the host may start as a chat, a session id. Both are minted once per launch and sent unchanged on every replay, since the host's replay fingerprint covers them. The phone arms its pending selection with that reservation before sending, so it lands on the terminal (matched by pane halves) or chat (matched by session id) as soon as the tab is listed. For an agent whose prompt is pasted after start, that is long before the reply, which waits for delivery. Landing also frees the "+" lock; the lock holds the create's id, so an older launch's reply cannot free a newer one's. The reply now only adds its own handle or session id (an older host ignores the reservation), starts the fallback countdown, and reports prompt delivery. A tab the user picks mid-launch replaces the pending selection, so the launch-start tab check is gone. A reservation the host refuses as already taken reads "Couldn't start the agent. Try again." on the first send, and as unconfirmed after a replay. The mobile UUID fallback now yields a v4 UUID, because a pane key's leaf must be one. The host launch path moved to new-tab-agent-host-launch.ts; session route parity re-pinned for that move and the landing's lock release.
The four launch scenarios now expect the pane key and session id the phone sends (the scripted ids come first, so the operation id moves from ...001 to ...004).
…s looking at it
When a launch's reply was lost after its tab had already landed, the phone said "Couldn't confirm the agent started", although the listed tab proves it did. Now a listed tab narrows the doubt to the prompt or notes ("The agent started, but couldn't confirm the notes were sent."), the notes stay unsent, and a bare launch says nothing. Only the nested-function parity pin moves, for handleCreateTerminal passing the tab list to the launch.
…arams schema The anti-slop audit rejects Reflect.get; parsing with AgentLaunchReplay also asserts the host accepts the params the phone sent.
…mporting its schema Mobile code may import the params contract only as types. The phone's tests now read the sent reservation by narrowing, a chat reservation is checked through the real host dispatcher, and the older-host drop is pinned host-side.
The "+" lock is now freed when the launched tab lands, but review notes are only cleared when the launch's reply confirms delivery, which for a prompted launch can take up to a minute. In that window "Send review notes to AI" still offered the same notes, and choosing a new agent session started a second agent with them. The notes a new agent session is being started with are now held from the tap until that launch settles: the Send button no longer counts them, the sheet no longer offers them, and a stale tap on the old sheet starts nothing. Notes the host did not deliver become sendable again once the reply arrives.
4 added (+ as a terminal, + as a chat, notes delivered, notes not delivered). 10 existing create-terminal goldens move only because the recorded state now shows one pending selection instead of two refs; their requests are unchanged.
6a84346 to
6cbfb78
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (50)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe mobile session flow now uses a unified pending-selection model for tabs, terminals, and launched agent surfaces. Eligible launches can send reserved pane and session identifiers through the workspace host. Diff-note delivery tracks comments while a launch is in progress. Tests, RPC recordings, and pilot scenarios cover launch results, selection updates, and note-delivery outcomes. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The mobile launch changes have no identified merge-blocking issue. Failed launches already clean up correctly; merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Agent launches now follow the computer’s launch policy, with duplicate-launch prevention and explicit handling of uncertain delivery. No security regression was established in the inspected paths, but workspace authorization and deployed-version behavior were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 29.49% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 78 functions across 35 files. (15 skipped: 15 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
…ream-transport-release Corpus is 793 goldens: main's 794 (four #22954 launch goldens) minus this branch's deleted notification-unsubscribe matrix. Bridged tally 401 identical, 342 / 3 / 6 / 33 / 8, confirmed by replay; re-record with --prune moved nothing.

Based on
main#23732 (goldens without the per-golden commit pin) has merged, so this PR now targets
maindirectly and is no longer stacked. Nothing about the phone's behaviour changed in this move.Against
main, the PR changes 50 files: 36 of code, tests and the scenario file, plus 14 goldens.pnpm --dir mobile rpc:diff origin/mainreports 10 changed, 4 added, 0 removed (794 goldens). The 4 added are the new launch scenarios (+ as a terminal, + as a chat, notes delivered, notes not delivered). The 10 changed are existing create-terminal goldens whose recorded state now shows one pending selection instead of two refs; their requests are unchanged.ELI5
Starting an agent from the phone's "+" menu, a quick command, or review notes' "New agent session" now asks the computer to start it, and the computer decides chat or terminal the same way it does everywhere else: from the "open agent tabs in chat" setting. Before, the phone decided on its own — Claude and Codex from "+" always became a chat when the computer could make one, and review notes were typed into the new terminal right after it opened, racing the agent's startup.
The phone also names the new tab before it asks, so it switches to the tab the moment it appears, instead of waiting until the computer has finished typing the prompt into the agent.
What Changed
Builds on #22762's shared launch client, now on
main.Before
agentSession.createSupportand thenagentSession.create(a chat whenever supported, ignoring the chat-by-default setting); every other agent gotsession.tabs.createTerminal.session.tabs.createTerminalwith the agent and its prompt.session.tabs.createTerminalwith the agent, then an immediateterminal.sendof the notes while the agent was still starting. This is the session tab's "Send review notes to AI" → New agent session: it opened a Claude terminal, flashedmobile_input_floor_unavailableand never delivered the notes (same onmain; fix(mobile): start AI-button agents through agent.launch, never a bare shell #22762 does not touch it).agent-session:<sessionId>to select it.After
agent.launchReplayinto the existing workspace (promptsubmitfor quick commands and notes; launch sourcesquick_commandanddiff_notes_send). The host picks chat or terminal and delivers the prompt.agent.launchReplayas itspaneKeyandsessionId. They are minted once per launch and resent unchanged on every retry of the same operation, because the host's replay fingerprint includes them; a new tap is a new operation with new ids. This is how the desktop's own background launches work: the caller mints the tab, leaf and operation id before calling the host and reuses them on retry.agent-session:id is gone.new-tab-agent-host-launch.ts; the mobile UUID fallback (nocrypto.randomUUID) now yields a v4 UUID, because a pane key's leaf must be one.agent.launch.v2+agent.launch.replay-required.v1) keep today's paths, marked COMPAT for removal once no supported host predates them. If the host refuses the very first send as unsupported, this launch falls back to today's path; an outcome that may have started is never retried as a second agent.Why
These were the last session-screen launch points choosing their own surface, so the same tap produced a chat or a terminal depending on which button you used. Routing them through the host's one launch method removes that.
The phone only learned which tab was the launch from the reply, and the reply comes after prompt delivery, so navigation, the "+" lock and the delivery receipt all waited on the slowest step. Naming the tab up front separates "which tab is it" from "was the prompt delivered" without any host change, using the
paneKeyandsessionIdfields the launch method already accepts. Alternatives considered: landing on any new tab that appears (two concurrent launches confuse it), launching bare and then sending the prompt to the terminal (loses the host's prompt delivery and adds a second operation), and having the host reply early and report delivery separately (a host and wire change; listed below as an optional follow-up).Safety of phone-minted ids: every host, desktop and phone holder of a pane key, chat tab id or session id was checked. A fresh UUID matches no existing entry, and a key that is already live or a session that already exists is refused rather than adopted, so a new launch never duplicates or renames an existing session. With the workspace open on the desktop, the desktop adopts the reserved tab and leaf ids unless the tab id already exists, which a fresh UUID never does.
Optional follow-up: the host could reply as soon as the surface exists and report prompt delivery separately; the phone would then free the "+" lock and show the delivery result independently of each other. Not needed for this fix.
Recorded deviations:
Linked Issue
Part of STA-8255 (every agent launch entry point should honour the chat default). Related: #18098.
Visual Proof
Android emulator driven only through
orca emulator, paired with an isolated dev host built frommain(89cf55dfc8, its own profile and home). BEFORE = phone JS from the base branch (982958b4e0); AFTER = this branch (df62184dcd; the final commitd2b68830cdonly adds the review-notes hold, checked separately below). These runs used the branch before its rebases onto #22762's later heads; later rebases changed only the base branch's own files, and the final run is below. Prompts were harmless; the "Goose" agent was a local stand-in that waits 20 s before it reads input, to make a slow-starting agent visible.At the final head (
d2b68830cd), review notes sent to the slow stand-in agent are held until that launch replies, so they can't start a second agent:Sending those same notes to Claude then worked: "Notes sent", the note was Claude's first message, and the notes were cleared.
Final run (before the rebase onto
main) on78b37d01d1: "+" → Claude with the chat default off and on, notes → the slow stand-in (lands in 0.33 s, Send greyed, one launch), the same notes → Claude (first message, marked sent), an untrusted folder, a workspace open in the desktop window (the host's tab id is the tab half of the pane key the phone sent), and "+" → Terminal all passed. The review screen's Send Unsent Notes → New Agent Session, on #22951's one-sheet-at-a-time drawer, shows one sheet at a time and ends with "Review notes sent", 0 unsent:main(phone JS74191a3d22, the same tree as the head): "+" → Claude with the chat default off and on, notes → the slow stand-in (Send greyed, one launch, notes kept), notes → Claude (first message, marked sent), the review screen's one-sheet send, a workspace open in the desktop window, and "+" → Terminal all passed. The untrusted-folder case first showed Claude's terminal in the phone's chat view with the trust prompt hidden; that was the shared test phone's own "Open sessions in Chat UI" setting being on. With it off, the same build showed the trust prompt at once, and the per-tab "Switch to chat view" stays available from a long-press.Earlier shots (iPhone simulator, before the phone chose the launch's ids)
iPhone simulator driven only through
orca emulator, paired with an isolated dev host built from #22913 (its own profile; every host read and write went through a client pinned to that profile). Phone build: this branch plus #22951. Prompts were harmless ("say hello"); folder-trust prompts were never answered.The same refusal in a session with open tabs showed nothing: a failed create was shown only on the empty-session screen. The failure is now also shown as a toast (commit
fb4bb40352; its test fails without the fix). The caller's own copy is kept when it gave one, such as "Couldn't run ". Re-checked on Android against a host from fix(agent-launch): refuse a disabled agent on the chat route too #23043, with Claude turned off while the "+" menu was open:With the chat default on, tapping a disabled Claude used to start a chat, because the host's chat route didn't check whether the agent is enabled (on
maintoo). fix(agent-launch): refuse a disabled agent on the chat route too #23043 fixes that on the host; the shots above are against it.Host tab lists confirmed the surfaces: chat default on → an agent-session tab; off → a terminal tab.
Testing
use-mobile-session-terminal-create-agent-launch.test.ts: "+" launches throughagent.launchReplaywith no prompt or source and waits for the terminal by its reserved pane or the reply's handle, and the chat by session id (no tab id set); older host and first-send refusal fall back to today's path; an unknown outcome starts nothing else; quick commands send their prompt withquick_command; notes usediff_notes_send, are marked sent only when delivered, and stay unsent with a notice when not; shell-command quick commands stay plain terminals.use-mobile-session-terminal-create-agent-launch.test.ts: a host refusal from the "+" menu shows the host's reason as a toast when the session already has tabs (fails without the fix).pending-session-selection.test.ts: chat by session id whatever its tab id; terminal by handle; waits across tab lists that lack it, then gives up; the tab-id and handle halves drop independently.use-mobile-session-tab-application-launch.test.ts: when a launched terminal or chat lands in a tab list, the phone sends onesession.tabs.activatefor it (caller navigation, like a tap) and switches to it; a host "follow" navigation still wins and sends nothing. Route parity re-pinned for that activation (callback body, +1 identity payload, +4 strings); The 4 launch goldens were re-recorded for the immediate tab-list read (each loses its 500 ms timer effect; requests and state unchanged); the older-host Codex chat test now asserts the open terminal stays live and the tab list is read at once.use-mobile-session-terminal-create-agent-launch.test.ts: a tab picked while a prompted launch is still waiting for its reply keeps the phone there (fails without the fix).mobile-session-diff-notes-new-agent-send.test.ts(the real notes, create and sheet hooks together): after the tab lands and "+" unlocks, sending the same notes again while the first reply is outstanding offers nothing, a stale tap on the old sheet starts nothing, and exactly oneagent.launchReplaygoes out; delivered notes leave the list; notes reported not delivered can be sent again. Route parity re-pinned for it (+3 hooks, +1 callback, callback bodies, the diff view's leaf JSX); no golden moved.main(its code commits replayed; goldens re-recorded once on the rebased tree): the same 4 added and the same 10 create-terminal bodies moved (one pending value instead of two refs), everything else header-only; re-validated in normal mode. Session route parity re-pinned with the same count moves as before (−1 hook, +14 strings); bridged-parity tallies unchanged.paneKey/sessionId, and every tap reserves new ids (use-mobile-session-terminal-create-agent-launch.test.ts); against the real host launch handler, a lost reply is replayed with the same ids, the host answers from its ledger and creates the terminal once, with the reserved tab and leaf ids (agent-launch-mobile-replay.test.ts); a Claude chat reservation passes the real host dispatcher's params check, an older host's schema drops both fields rather than refusing (agent-launch-params.test.ts), and the phone then lands by the reply's handle; both taken-reservation refusals show readable copy, and after a replay read as unconfirmed; the tab lands and the "+" lock frees before a paste-after-start agent replies; a second launch's lock survives the first one's reply; an empty session whose only tab the host selected before replying still lands and records the pick; no countdown before the reply, 5 tab lists after it; the no-randomUUIDfallback mints a pane the host adopts. A reply lost after the tab landed reports only the prompt or notes as unconfirmed, keeps notes unsent, and is silent for a bare launch.handleCreateTerminal), strings 548 → 540 (nine moved with the host launch into its own module, one'launched'added for the landing). A later fix re-pinned nested functions once more, forhandleCreateTerminalpassing the tab list to the launch; no golden moved.mainafter fix(mobile): start AI-button agents through agent.launch, never a bare shell #22762 merged (its commits dropped; base retargeted tomain). One conflict by hand: main's fix(mobile): size a terminal's first subscribe from the document's reported cell box #23080 addedsubscribeIntendedActiveTerminal, which now reads the one pending selection (pendingSelectionHandle(...) ?? activeHandle, the same meaning as the old ref), and main's rewrite of the webview test file replaced this branch's one-line edit there. This branch's net change outside goldens and route parity is byte-identical to before. Route parity re-pinned on main (this branch's moves: hooks 281 -> 283, callbacks 80 -> 81, strings 529 -> 538). Goldens re-recorded from a repinned baseline: against main, 4 added, the same 10 create-terminal bodies moved, 780 header-only; each of the 14 changed goldens matches its pre-rebase recording except for the baseline. Mobiletscand the tests-typecheck ratchet, this PR's 12 mobile test files plus the recording, pin-guard, params-boundary, subscription and review-send suites, the rootagent-launch-paramstest andcheck:code-quality:changedall pass.tsc, tests-typecheck ratchet, targeted mobile suites (session pending/create/tab-application/route-parity/last-tab-close/webview/startup, launch replay and architecture, all ofrpc-recordingandbridged-parity), oxlint,check:code-quality:changed0 findings. Earlier revisions: full mobile suite 881 files / 9,593 tests.e01b85424ab, which includesmainata57863ba167). The code and test commits replayed unchanged, and every product file is byte-identical to before the rebase. The scenario edits were re-applied without the oldbaselineandversionfields, the baseline-only commits were dropped, and the goldens were re-recorded once withrpc:record --prune(10 changed, 4 added, 0 removed, as above).maindeleted the session route-parity test andmobile-session-last-tab-close.test.tsin test: remove junk tests that assert source text instead of behavior #23815 (tests that read source text), so this branch's edits to those two files are gone with them. Mobiletscand the tests-typecheck ratchet pass. This PR's mobile tests plus all ofrpc-recording(including the new recorded-request params check),bridged-parity/divergence-classesand the params type-only boundary pass (34 files, 1,886 tests). The rootagent-launch-paramstest, oxlint andcheck:code-quality:changedagainst the new base (0 findings, 35 files) also pass.mainafter test(mobile): record RPC goldens without a pinned commit, and check recorded requests against the desktop's params rules #23732 merged (squashe594cb06af3; now onmainat75040eba5a0). Only this PR's 15 commits were replayed, with no conflicts; every commit's content is unchanged.rpc:record --pruneon the rebased tree rewrote no golden, andrpc:diff origin/mainlists only the 14 moves above. Mobiletscand the tests-typecheck ratchet pass. This PR's mobile tests plus the recording, recorded-request params, derived-golden and launch-architecture suites pass (15 files, 1,720 tests), as do the rootagent-launch-paramstest, oxlint andcheck:code-quality:changedagainstmain(0 findings, 35 files).onPromptSentcalled)Notes
paneKeyandsessionIdare existing optional fields ofagent.launchReplay; a host that predates them drops them (the params schema is not strict) and the phone lands by the reply's handle or session id; a host that knowspaneKeybut notsessionIdlands a chat by the reply's session id. Hosts older than v1.4.206 keep today's paths.