Skip to content

Continue remote CLI conversations in Chat UI on paired servers - #33954

Merged
nwparker merged 2 commits into
mainfrom
fix/29494-remote-cli-chat-resume
Oct 26, 2026
Merged

nwparker merged 2 commits into
mainfrom
fix/29494-remote-cli-chat-resume

Conversation

@nwparker

@nwparker nwparker commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​395 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​353
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​162 $\color{#cf222e}{\Huge{\mathbf{−}}}$​64 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​98

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.

  • From Enable continuing remote CLI conversations in Chat UI #33590:
    • lets runtime: hosts through the terminal header, tab menu and Session History resume-in-chat gates, with raw ssh: relays, WSL recordings and unresolved owners still excluded;
    • requires the host's agent-session.structured.resume-history.v1 capability;
    • routes adoption, provider choice and the conflict-owner reveal to the recording host;
    • sends the optional CLI-source identity only when the host advertises it;
    • pins the host through the Session History launch.
  • Fix on top: the pane key. On a paired host, the desktop names a pane by its mirrored surface key (web-terminal-<host tab>:<leaf>). The host matches cliSource against 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 existing toHostSessionPaneKey before sending it. Local keys are unchanged.
  • Fix on top: host-scoped launch joins. 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.
  • Update-the-host state: a verified host that lacks resume-history shows the pane-header button disabled and dimmed, instead of hiding it. The update reason is in its tooltip and in its accessible name. The tab menu still hides the item, because a disabled menu item can't show a tooltip. A host whose capabilities haven't been checked yet offers nothing, as before.

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 in cliSource. 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;
    • the three ai-vault-session-resume-in-chat* files, native-chat-header-ownership, structured-agent-cli-conversation-adoption;
    • every structured-launch test that imports the launch registry.
  • pnpm tc, pnpm lint, the oxfmt check, type-aware oxlint, check:code-quality:changed and 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Mixed versions: gated on the host's existing capability, with no new RPC. Old hosts show the disabled update state, and unprobed hosts show nothing.
  • Mobile: mobile has no "adopt a terminal conversation into a native chat" flow on any host. Its per-tab chat-view toggle already works on paired servers. Adding the adopt flow on mobile is a separate feature.
  • Folder workspaces are covered by Enable continuing remote CLI conversations in Chat UI #33590's tests.
  • Follow-ups: toHostSessionPaneKey passes 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

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

Zrzzzz and others added 2 commits October 26, 2026 06:37
…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.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cfbc538e-3971-41b3-b1df-a54ce44f99ad
Commits

Reviewing files that changed from the base of the PR and between 8851890 and f5ee033.

Files selected for processing: 27
  • docs/site/content/docs/agents/native-chat.mdx
  • src/renderer/src/assets/terminal.css
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat-launch.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat-launch.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat-workspace.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat.ts
  • src/renderer/src/components/tab-bar/CliChatResumeMenuItems.tsx
  • src/renderer/src/components/tab-bar/cli-chat-resume-run.test.ts
  • src/renderer/src/components/tab-bar/cli-chat-resume-run.ts
  • src/renderer/src/components/tab-bar/cli-chat-resume-source.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-reload.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-unconfirmed-or-retried.test.ts
  • src/renderer/src/lib/structured-agent-session-launch.ts
  • src/shared/structured-agent-cli-conversation-adoption.ts

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

Walkthrough

Resume eligibility and launch routing now support conversations recorded on paired runtime hosts. Remote resume offers depend on host capability, and resume actions target the recording host. The interface communicates when a host update is required. Documentation describes remote continuation and terminal-agent ownership conditions. Disabled pane-title split triggers also receive updated styling.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to f5ee0

The host-update action remains visible but disabled as intended. No identified issue prevents merging after normal checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning src/renderer/src/assets/terminal.css adds styling for disabled pane-title split triggers (50% opacity when the title bar is active, hovered, or focused; hover keeps the normal foreground). This target… Remove the terminal.css split-trigger hunk from this PR, or move it to a separate PR linked to its own issue. Then update the PR description if the change stays. Reassess after the hunk is removed or justified.
Docstring Coverage Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 18 files. (9 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: enabling remote CLI conversation continuation in Chat UI on paired servers.
Description check Passed The description is mostly complete. It explains the user impact, implementation, rationale, linked issue, testing, scope, compatibility considerations, and known limitations. It does not include the r…
Linked Issues check Passed Linked issue #29494 is the only active direct target. Its requirement: terminal panes on a remote runtime server must offer a path to Chat UI, either by offering terminal-to-chat continuation on runti…
Full details: Description check

Explanation

The description is mostly complete. It explains the user impact, implementation, rationale, linked issue, testing, scope, compatibility considerations, and known limitations. It does not include the required before-and-after visual attachments or explicitly mark the visual proof as N/A, but this omission does not make the description largely incomplete.

Full details: Linked Issues check

Explanation

Linked issue #29494 is the only active direct target. Its requirement: terminal panes on a remote runtime server must offer a path to Chat UI, either by offering terminal-to-chat continuation on runtime hosts or by keeping a working switch. The PR implements the first option. Per the supplied summary, tab-session-history-switch.ts now admits runtime hosts for CLI conversations (resolvePaneResumeInNewChatOffer returns available when the host advertises agent-session.structured.resume-history.v1). TerminalPaneResumeInChatButton.tsx keeps the button visible. cli-chat-resume-source.ts no longer restricts to the local host. Raw SSH, WSL, and unresolved owners stay excluded. Tests in tab-session-history-switch.test.ts, cli-chat-resume-run.test.ts, and TerminalPaneResumeInChatButton.test.tsx cover the remote path. Limits: the file diffs could not be read (changed blobs were missing from the checkout), so this verdict rests on the supplied summary and PR description, not on direct code reading.

Full details: Out of Scope Changes check

Explanation

src/renderer/src/assets/terminal.css adds styling for disabled pane-title split triggers (50% opacity when the title bar is active, hovered, or focused; hover keeps the normal foreground). This targets split triggers, not the resume-in-chat button. No linked issue (#29494) mentions split triggers. The PR description lists no split-trigger change and states 'No layout change'. The change has no concrete connection to the resume-in-chat objectives. The diff could not be read directly, so this finding depends on the supplied summary. Other changes (host routing, pane-key translation, launch identity scoping, button disabled state, locale strings, docs) map to the linked issue or the PR description.

Resolution

Remove the terminal.css split-trigger hunk from this PR, or move it to a separate PR linked to its own issue. Then update the PR description if the change stays. Reassess after the hunk is removed or justified.

Full details: Docstring Coverage

Explanation

Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 18 files. (9 skipped: 9 unsupported.)

Resolution

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

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants