Repository navigation
Continue remote CLI conversations in Chat UI on paired servers - #33954
Conversation
…date On a paired host the desktop names a pane by its mirrored surface key, but the host matches cliSource against its own agent-status rows, so every remote "Continue in Chat UI" create was refused as unreadable. Translate the key with toHostSessionPaneKey before sending. A resume launch's join identity now includes its execution host, so a remote resume never joins an in-flight resume of the same conversation id on another host. A verified host that lacks resume-history now shows the pane-header action disabled, with "Update Orca on this host to continue in Chat UI." in its tooltip and accessible name, instead of hiding it.
|
No actionable comments were generated in the recent review.
|
ELI5
On a desktop paired to a remote Orca server, including an SSH host that Orca now runs a managed server on, a Claude terminal pane never offered "Continue in Chat UI". Session History also refused to resume a remote session in Chat. Now both work, and the server that recorded the conversation takes it over. If that server runs an older Orca, the button stays visible but disabled, with "Update Orca on this host to continue in Chat UI."
What Changed
This PR builds on @Zrzzzz's #33590. Their commit is kept with their authorship.
runtime:hosts through the terminal header, tab menu and Session History resume-in-chat gates, with rawssh:relays, WSL recordings and unresolved owners still excluded;agent-session.structured.resume-history.v1capability;web-terminal-<host tab>:<leaf>). The host matchescliSourceagainst its own agent-status rows, which use the host tab id. So on every current host the create was refused as "The source conversation is no longer available." We now translate the key with the existingtoHostSessionPaneKeybefore sending it. Local keys are unchanged.Why
The host already owns the transcript and the import and ownership checks. Only the local-only gates in the renderer stood in the way, so reusing the host path avoids copying transcripts or starting an unrelated local chat.
Linked Issue
Fixes #29494
Visual Proof
The pane-header button appears on remote panes. On an older host it shows disabled with a tooltip. No layout change. Not captured here: a live paired provider is needed. #33590 describes its hidden-renderer captures of the gate.
Testing
cli-chat-resume-run.test.ts: a runtime source with the desktop's mirrored key sends the host's own key incliSource. This fails on the Enable continuing remote CLI conversations in Chat UI #33590 head (mirrored key sent as is) and on main (remote returns early).tab-session-history-switch.test.ts: a verified host without resume-history yields the disabled "update" source. Fails on the Enable continuing remote CLI conversations in Chat UI #33590 head.TerminalPaneResumeInChatButton.test.tsx: an older host's button is disabled, its accessible name and tooltip say to update, and it never runs.structured-agent-session-launch-unconfirmed-or-retried.test.ts: a remote resume never joins a local in-flight resume of the same conversation id. Fails without the fix.Passing, selected by import graph (36 files):
tab-session-history-switch(including its parity test),cli-chat-resume-run,TerminalPaneResumeInChatButton,TerminalPaneHeaderOverlay;ai-vault-session-resume-in-chat*files,native-chat-header-ownership,structured-agent-cli-conversation-adoption;pnpm tc,pnpm lint, the oxfmt check, type-aware oxlint,check:code-quality:changedand react-doctor pass.Not run: a live takeover on a paired host, and the Docker managed-orcad lane. This is a renderer-only change.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
#33590: OpenAI Codex, per its author.
Agent skill upstream boundary
Notes
toHostSessionPaneKeypasses through pane keys it can't parse (legacy key forms) unchanged, and a host with duplicate PTYs for one pane can still refuse the match. Both cases fail closed: the host refuses the create and nothing is adopted twice.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)