Skip to content

Open a native chat copy in the CLI without waiting for History - #29126

Merged
brennanb2025 merged 8 commits into
mainfrom
brennanb2025/rcc-d-chat-to-cli
Oct 15, 2026
Merged

brennanb2025 merged 8 commits into
mainfrom
brennanb2025/rcc-d-chat-to-cli

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​659 $\color{#cf222e}{\Huge{\mathbf{−}}}$​31 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​628
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​831 $\color{#cf222e}{\Huge{\mathbf{−}}}$​94 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​737

ELI5

“Resume in New CLI” on a native chat tab waited for the full Session History scan. A large or busy history could therefore hide the action. The action now appears immediately and asks the computer running that chat to prepare a separate CLI conversation when clicked.

What Changed

The host derives the current conversation, account and directory from its saved chat record, then reuses the existing provider copy and terminal startup paths. The source chat stays open. Older paired hosts keep one bounded History lookup; a failure from a capable host never starts a History scan or runs the operation locally.

The review repairs restore destination-workspace activation, preserve supported copy and old-host wait limits, and prevent preparation that is still queued from starting after the source closes. The initiating menu shows the existing spinner, remains dismissible, and cannot close a later menu when the old operation finishes. Empty native conversations are refused using the existing saved journal; uncertain delivery reports a preparation error. This does not claim that every external provider file has flushed its latest turns.

Why

The host already owns the conversation identity and preparation rules. Using those facts removes global discovery as an action prerequisite. Shared terminal completion, the existing request queue and the existing journal avoid parallel launch, cancellation or content-scanning mechanisms.

Intended differences from the common pattern: external CLI copies need provider-specific saved-file/account preparation, and older paired hosts need the bounded compatibility path. SSH and WSL restrictions remain in place.

Linked Issue

Internal maintainer work. Replaces the native-chat-to-CLI portion of #28284.

Visual Proof

Required remote Electron comparison is blocked. No app or provider flow ran and no screenshots were produced. The M4 was saturated, Windows high spec lacked safe capacity after an isolated native-dependency install failure, and Windows low spec was unreachable. Shared QA machines also have active rigs; Windows high spec is reserved for a higher-priority review. This PR remains a draft.

Testing

  • Manual rendered QA and before/after screenshots
  • Automated regression checks added or updated

PR Checks 38738391779 passed on exact head c8f7e783d831a381a37b5905209f0198d47ccdfb: static analysis/typechecks, all five full unit-test shards, relay integration, cross-version wire compatibility and Linux/Windows packaging. The newer workflow deliberately skips its aggregate after successful routing validation; that validation succeeded and no required job failed or was cancelled. This satisfies the binding CI ruling. Rendered Electron checks were not run by this draft workflow.

No local test, typecheck or build ran under the no-dependency builder rules. Staged-file lint, React checks and formatting ran through existing tooling. Runtime provider copies, setup/default-tab behavior, caret focus, folder workspaces, real old peers and network interruption remain unverified.

Review

Two source-review rounds, a fresh design decider, a dedicated performance pass and a readiness source audit checked the affected paths. Five confirmed findings were repaired; no new confirmed finding was found in Round 2. Final exact-commit confirmation: renderer, host/readiness and performance reviewers independently confirmed c8f7e783d831a381a37b5905209f0198d47ccdfb. Production is unchanged from the reviewed repair commit; the last commit consolidates two tests. The combined transport test does not independently isolate queued cancellation while pairing stays unchanged; the source cancellation path was verified..

Deferred concerns: a supported older OpenCode copy reaching the changed startup mode, a natural Claude filename/record-ID mismatch, and a journal/provider-file content disagreement were not proved by the bounded traces. Existing locator access-error wording and OMP home lookup remain shared-mechanism follow-ups outside this PR.

Agent skill upstream boundary

  • Not applicable: no upstream skill source is copied.

Notes

Author: @BrennanKB5. No new saved fields or RPC method; the chat request is capability-negotiated and the result adds optional preparation facts. Folder paths and account selection belong to the execution host. Main has not been integrated during review; the final integration and its exact-commit checks remain for after QA.

Checklist

  • Focused on native-chat-to-CLI preparation
  • User-facing change and mechanism explained
  • Before/after screenshots attached
  • Cross-platform, remote and old-peer contracts reviewed in source
  • All readiness gates complete

@brennanb2025

brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

“Resume in New CLI” on a native chat tab waited for the complete Session History scan, so a large or busy history could hide the action. This PR offers the action immediately and asks the computer running that chat to prepare a separate CLI conversation from its saved identity. Older paired hosts retain one bounded History lookup.

Two source-review rounds, an independent design check, a dedicated performance review and a readiness audit completed at c8f7e783d831a381a37b5905209f0198d47ccdfb. Five confirmed issues were repaired:

  • Restore destination-workspace activation through the shared launch path.
  • Preserve supported provider-copy and older-host wait budgets.
  • Remove unsent queued preparation when the source closes.
  • Keep visible, dismissible progress in the initiating menu without closing a later menu.
  • Refuse native chats with no proved conversational content using the existing saved journal.

No new confirmed defect was found in the final source review. Source inspection does not prove that every external provider file contains the journal’s latest turns. Older OpenCode startup-mode and Claude filename/identity concerns remain unproved; inherited file-access wording and OMP home lookup remain outside this PR. The consolidated transport test also does not independently isolate cancellation while pairing stays unchanged; that path was verified in source.

PR Checks 38738391779 passed on exact head c8f7e783d831a381a37b5905209f0198d47ccdfb: static analysis/typechecks, all five full unit-test shards, relay integration, cross-version wire compatibility and Linux/Windows packaging. The newer workflow deliberately skips its aggregate after successful routing validation; that validation succeeded and no required job failed or was cancelled. This satisfies the binding CI ruling. Rendered Electron checks were not run by this draft workflow.

Rendered QA covers the Orca-owned acceptance criteria. Grok drove hidden Electron through Playwright CDP on M4Air at exact branch head c8f7e783, with isolated homes and synthetic saved conversations. Per the coordinator’s final scope ruling, Orca must select the right Codex source, home and pinned rollout; creating an independent conversation after launch remains the unchanged provider’s fork operation. No sign-in was performed or required for these checks.

Check Evidence and result
Busy Session History Main 02356732 hid Claude’s action while its real default-limit lookup was pending, then showed it after completion. The branch exposed Claude’s action during a real refresh. The registered-account branch trace also recorded Codex’s action visible while a real refresh remained pending (793 ms after start). Covered; a separate cold Codex main comparison is not required.
Codex ordinary home The new active terminal ran codex fork b8ffb82a-50f8-4fb2-964e-0c46212ff286. Its live child’s effective CODEX_HOME was the isolated ordinary home. That home contained the matching source rollout, 576 bytes, marker present, SHA-256 7653ce9754867e64e943ae859e01856272f419a331d229d96a00f322def6a407. Both native source tabs remained. Covered.
Codex registered per-account home The active terminal forked the same source ID and the live child used the home returned by account registration. That home held the matching pinned rollout with the same hash and identity, linked to the ordinary fixture (inode 386932707, link count 2). The link is source preparation, not a claimed provider-created copy. Both native source tabs remained. Covered.
Host without the newer capability The accepted local legacy-routing simulation used exactly one real bounded History lookup: limit 250, 500 rows across providers, 827 ms, no unlimited/forced scan or retry, followed by the existing preparation/terminal path. This covers preservation of the unchanged main behavior under the coordinator’s ruling. It is a routing simulation, not an older-binary/network test.
Claude launch Earlier rendered QA activated the destination terminal with the real resume/fork invocation and retained both source tabs. It reached onboarding. No authenticated provider continuation is claimed.

The Codex CLIs stopped at sign-in, and the legacy simulation’s CLI subsequently reported that the source was not found in its default-home isolation. Those observations do not fail the approved Orca-owned acceptance criteria or claim successful provider continuation. OpenCode/OMP runtime continuation was not exercised. The source/performance review’s deferred concerns above remain unproved; no new confirmed defect was found.

Owned test apps and isolated provider helpers have exited, both owned remote QA checkouts have been removed, and evidence is preserved outside the checkouts. The rendered retry’s real-config hashes matched before and after; an earlier preflight hash drift has no identified writer and is excluded from that claim.

Ready to merge: final readiness passed on c8f7e783 with no proven blocker. Review threads: 0 unresolved. Main was fetched at fd21909f; it has no changes to this PR’s touched paths and the PR has no conflicts, so the conditional end-of-review main merge was unnecessary. The PR is out of draft. The automatic ready-for-review PR Checks run 38786402671 passed on this exact head: repository guards and aggregate routing validation succeeded, and the remaining checks were deliberately skipped using the existing successful full run above. No required job failed or was cancelled. The separate Headless Node server run 38786402484 also passed, including cross-runtime persistence and structured-chat template checks. GitHub reports CLEAN / MERGEABLE, with zero unresolved review threads. No PR merge, force-push, code change or new rig was performed during this acceptance update.

CDP clips from the retry (pending state comes from the associated call trace):

Main default control: Claude menu while its History lookup was pending.

Main Claude menu during pending lookup

Branch menu with “Resume in New CLI”; the associated Claude trace records the action visible while the real refresh remained pending.

Branch menu with Resume in New CLI

Ordinary-home Codex destination: the launched CLI at its sign-in boundary. No sign-in was used; provider-internal copying is unchanged by this PR.

Launched Codex CLI at sign-in boundary

@brennanb2025
brennanb2025 marked this pull request as ready for review October 15, 2026 18:31
@coderabbitai

coderabbitai Bot commented Oct 15, 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: 65b0e148-7f3c-4ff3-9260-ec6dc5e91ef1
📥 Commits

Reviewing files that changed from the base of the PR and between c8f7e78 and ea61923.

📒 Files selected for processing: 1
  • src/main/ai-vault/structured-chat-cli-fork.ts
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/main/ai-vault/structured-chat-cli-fork.ts

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

📝 Walkthrough

The change adds a source-chat fork request and backend preparation for structured conversations, including Codex, OpenCode, and Pi records. Renderer code negotiates fork support, prepares a session, and launches it from a native chat tab. Runtime calls and subscriptions now check environment pairing revisions. Tab menus show pending state, and context-menu completion uses opening generations.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to ea619

No actionable issue is established for this change; it is ready for normal merge checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 13.79% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 30 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: enabling native chat copies to open in the CLI without waiting for Session History.
Description check Passed The description covers the required sections and explains the user-facing change, implementation, rationale, linked issue, testing, review status, limitations, and compatibility considerations. It exp…
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
  • 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.

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61fa6fa8-d51f-4582-b438-701a5ccc35f2
📥 Commits

Reviewing files that changed from the base of the PR and between 36b2ed4 and c8f7e78.

📒 Files selected for processing: 30
  • src/main/ai-vault/runtime-session-scanner.ts
  • src/main/ai-vault/structured-chat-cli-fork.test.ts
  • src/main/ai-vault/structured-chat-cli-fork.ts
  • src/main/ai-vault/structured-chat-conversation-copy.ts
  • src/main/ipc/ai-vault-resume.ts
  • src/main/runtime/rpc/methods/ai-vault.ts
  • src/preload/api/ai-vault-api.ts
  • src/preload/api/ai-vault-bridge.ts
  • src/renderer/src/components/right-sidebar/AiVaultSessionSurfaceSwitchMenuItems.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-session-launch-actions.ts
  • src/renderer/src/components/tab-bar/NativeChatCliForkMenuItems.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/tab-bar/SortableTab.update-depth-probe.test.tsx
  • src/renderer/src/components/tab-bar/SortableTabContextMenu.tsx
  • src/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.test.tsx
  • src/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.tsx
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.test.ts
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.ts
  • src/renderer/src/lib/ai-vault-session-resume-preparation.ts
  • src/renderer/src/lib/launch-ai-vault-session-and-reveal.ts
  • src/renderer/src/lib/native-chat-cli-fork-preparation.test.ts
  • src/renderer/src/lib/native-chat-cli-fork-preparation.ts
  • src/renderer/src/web/preload-api/web-ai-vault-api.ts
  • src/renderer/src/web/preload-api/web-runtime-calls.ts
  • src/renderer/src/web/preload-api/web-runtime-environments-api.ts
  • src/renderer/src/web/web-preload-api-runtime-calls.test.ts
  • src/shared/ai-vault-chat-fork-contract.ts
  • src/shared/ai-vault-resume-preparation.ts
  • src/shared/protocol-version.ts
  • src/shared/rpc-contract/ai-vault-params.ts

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

@brennanb2025
brennanb2025 merged commit 1b1d09c into main Oct 15, 2026
32 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/rcc-d-chat-to-cli branch October 15, 2026 22:00
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