Repository navigation
Resume terminal conversations in native chat without waiting for History - #29150
Conversation
…2025/rcc-b-source-admission # Conflicts: # src/main/native-chat/agent-session-journal/journal-legacy-import.ts
…' into brennanb2025/rcc-b-source-admission
…ion' into brennanb2025/rcc-c-cli-to-native
…urce-admission # Conflicts: # src/main/native-chat/agent-session-journal/journal-legacy-import.ts # src/main/runtime/orca-runtime-structured-agent-session-create-intent.test.ts # src/main/runtime/session-tabs/structured-session-create-support.ts # src/main/runtime/structured-agent-session-create-adoption.ts
…ion' into brennanb2025/rcc-c-cli-to-native # Conflicts: # src/renderer/src/lib/launch-cancel-tombstones-compat/structured-agent-session-launch-cancellation.test.ts # src/renderer/src/lib/launch-cancel-tombstones-compat/structured-agent-session-launch-cancellation.ts
main's new test predates launch cancellation taking the active layout owner.
…ry walks A PI_CODING_AGENT_DIR that already ends in sessions, or any custom folder, made admission expect <dir>/sessions while the lookup searched <dir>, so a found conversation was refused.
…ion' into brennanb2025/rcc-c-cli-to-native
…ion' into brennanb2025/rcc-c-cli-to-native
… per account Each agent's import described where an account keeps its conversations twice, once for the path check and once for the lookup, and the two could disagree (the linked-folder and Pi custom-root refusals). The import now names one conversation store per account; the create path resolves it once and both the hook-path check and the fallback lookup judge that same store. OpenCode's store is its exact database.
…ion' into brennanb2025/rcc-c-cli-to-native
…i-to-native # Conflicts: # src/renderer/src/store/slices/worktrees/teardown/worktree-purge-state.ts
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a1692d8b-1a0a-4134-b82d-a44a4a0ef45e
📒 Files selected for processing: 60
src/renderer/src/app-shell/use-app-startup-hydration.tssrc/renderer/src/components/native-chat/structured-agent-session-status-bridge-unconfirmed-start.test.tsxsrc/renderer/src/components/right-sidebar/AiVaultSessionSurfaceSwitchMenuItems.tsxsrc/renderer/src/components/tab-bar/CliChatResumeMenuItems.tsxsrc/renderer/src/components/tab-bar/SortableTab.tsxsrc/renderer/src/components/tab-bar/SortableTabContextMenu.tsxsrc/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.test.tsxsrc/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.tsxsrc/renderer/src/components/tab-bar/cli-chat-resume-feedback.tssrc/renderer/src/components/tab-bar/cli-chat-resume-run.test.tssrc/renderer/src/components/tab-bar/cli-chat-resume-run.tssrc/renderer/src/components/tab-bar/cli-chat-resume-source.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.test.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.tssrc/renderer/src/components/tab-bar/use-sortable-tab-context-menu.test.tssrc/renderer/src/components/tab-bar/use-sortable-tab-context-menu.tssrc/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.test.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsxsrc/renderer/src/hooks/ipc-events/session-tab-ipc-bridge.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/lib/agent-session-launch-plan.tssrc/renderer/src/lib/ai-vault-tab-title-requests.tssrc/renderer/src/lib/launch-cancel-tombstones-compat/structured-agent-session-launch-cancellation.test.tssrc/renderer/src/lib/launch-structured-agent-session.tssrc/renderer/src/lib/structured-agent-launch-settlement.tssrc/renderer/src/lib/structured-agent-session-launch-callers.tssrc/renderer/src/lib/structured-agent-session-launch-create-call.tssrc/renderer/src/lib/structured-agent-session-launch-errors.tssrc/renderer/src/lib/structured-agent-session-launch-outcome-tracking.tssrc/renderer/src/lib/structured-agent-session-launch-persistence.test.tssrc/renderer/src/lib/structured-agent-session-launch-persistence.tssrc/renderer/src/lib/structured-agent-session-launch-record.tssrc/renderer/src/lib/structured-agent-session-launch-registry.tssrc/renderer/src/lib/structured-agent-session-launch-reload.tssrc/renderer/src/lib/structured-agent-session-launch-slot.tssrc/renderer/src/lib/structured-agent-session-launch-surface.tssrc/renderer/src/lib/structured-agent-session-launch.tssrc/renderer/src/lib/structured-agent-session-provisional-tab.tssrc/renderer/src/lib/workspace-session-hydration-keys.tssrc/renderer/src/lib/workspace-session-unified-tabs.tssrc/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.tssrc/renderer/src/runtime/structured-agent-session-client.tssrc/renderer/src/runtime/structured-agent-session-tab-retirement.test.tssrc/renderer/src/runtime/structured-agent-session-tab-retirement.tssrc/renderer/src/runtime/structured-launch-cancel-layout-owner.test.tssrc/renderer/src/runtime/web-session-client-owned-tab-placement.tssrc/renderer/src/runtime/web-session-tabs-sync/terminal-surfaces.tssrc/renderer/src/store/slices/tab-group-state.tssrc/renderer/src/store/slices/tabs-hydration.tssrc/renderer/src/store/slices/tabs/structured-chat-close-owner.test.tssrc/renderer/src/store/slices/tabs/tabs-close-actions.tssrc/renderer/src/store/slices/tabs/tabs-create-actions.tssrc/renderer/src/store/slices/tabs/tabs-drop-actions.tssrc/renderer/src/store/slices/tabs/tabs-group-actions.tssrc/renderer/src/store/slices/tabs/tabs-label-actions.tssrc/renderer/src/store/slices/tabs/tabs-move-actions.tssrc/renderer/src/store/slices/tabs/tabs-reconciliation.tssrc/renderer/src/store/slices/tabs/tabs-slice-contract.tssrc/renderer/src/store/slices/worktrees/teardown/worktree-purge-state.tssrc/shared/workspace-layout/tab-order.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.
…alive when the terminal closes A History click that joins a pending terminal-tab resume now takes the launch over: the terminal hand-off runs at join time and the create resumes by conversation id, so closing the terminal before create no longer abandons the shared launch.
…i-to-native # Conflicts: # src/renderer/src/lib/structured-agent-session-provisional-tab.ts # src/renderer/src/store/slices/tabs/tabs-slice-contract.ts # src/renderer/src/store/slices/worktrees/teardown/worktree-purge-state.ts
…hile the agent holds the send (#30134)" (#30572) This reverts commit fc925c3 until the real fix for STA-11160 lands. With it, `orca orchestration worker-start --agent claude` shuts a new Claude chat worker down right after Claude acknowledges its task: between the echo and the accepted row the send reads as no longer held, settlement reports it unknown, and worker-start tears the session down. Conflicts with #29150 were formatting only; resolved to the pre-#30134 code.
227 commits landed on main between 91b696b and 1529b0f, and only en-runtime-required.json conflicted; it is taken from main and regenerated. The six catalogs merged cleanly, so the earlier prune carries over. On the merged tree the detector found three more keys: the Checking chat support placeholder and the Could not build launch command message that stablyai#29074 left behind when it reworked the + menu, and the native-chat cannotResume message whose last reader stablyai#29150 removed. The prune is now 1,509 keys and none left the set. en.json goes from 16,395 entries to 14,886; en-runtime-required.json keeps 578 of them.
ELI5
Resume in New Native Chat could disappear or wait for a full Session History scan even though the terminal already knew which conversation its agent was running. The tab menu and header now use that identity immediately; the execution host decides ownership and imports the saved history.
What Changed
The menu and header share one pending launch for the same conversation. A confirmed refusal keeps the terminal selected without flashing an empty destination. The header opens an existing owning chat; the menu reports that the conversation is already held without navigating. Missing or empty history uses the not-saved message, while unreadable history uses load-error feedback.
The terminal identity is checked before dispatch. Closing it before dispatch abandons the click; closing it afterward leaves the destination independently owned. The existing tab-order owner reserves the destination's position without mounting a tab, preserves later selection, and restores the existing unknown-outcome recovery surface after a reload. Older hosts receive only fields they advertise.
Why
Create already owns conversation ownership and import admission. Using it removes the dependency on unrelated inventory work and follows the common pattern of passing known identity to execution. Existing import, launch, tab placement, focus and recovery mechanisms remain responsible for their own work. One optional saved address preserves recovery placement; no new discovery service or wire operation is added.
Linked Issue
Stacked on #29124, which stacks on #29119. The reverse direction from #29126 is now on main and was checked together with this PR in the final tab-menu re-check. Authored for @BrennanKB5.
Visual Proof
Integrated main-versus-branch QA completed; all changed outcomes are intended. Main's menu waits for busy History, while the branch offers the action during that scan:
Both preserve the correct imported conversation when the source closes before the create response:
The existing review-status comment contains the remaining paired screenshots and evidence limits.
Focused final merge re-check (whole-window screenshots; timestamped DOM/request records prove overlap):
Testing
6634a1119dc.Integrated A+B+C QA is complete: main
69ff84db234versus branch6634a1119dc, real Claude, matching Chat UI settings, setup/default tabs, isolated homes, hooks on, and controlled delays of actual History/create responses. The accepted comparison preserves the existing tabs and imported conversation; all changed outcomes below are intended. Some unchanged C rows ran ata6c158; refreshed admission, busy header, import, owner-menu and pending-close rows ran at6634a1119dc.Timing evidence comes from timestamped DOM observations aligned with actual request intervals; pending screenshots are representative and alone do not prove overlap. In the valid source-close runs, the source disappeared 8.040 seconds before main's response and 8.885 seconds before the branch response. Earlier late-close attempts and the initial main run with mismatched settings/hooks are excluded.
The History guard for an owned conversation was rendered. The stale-row race, where History shows the action before another chat claims the conversation, is covered by refusal-contract tests, not rendered QA. Twenty-two focused tests passed on
6634a1119dc, covering source filename/cwd/path, Codex legacy/system/per-account homes, older-host fallback and renderer recovery contracts. These are fixture/contract tests; no real Codex, phone, SSH/WSL or paired-host run is claimed. Provider continuation is not affected by this stack; unchanged provider resume path.Cleanup is complete: recorded app/server processes stopped, both independent QA checkouts and throwaway homes removed, driver terminal closed, and real settings/hooks hashes match the immediate Mac baseline. Earlier shared-machine hash drift remains unattributed. No real config was written and no credentials were copied.
Review
Three source-review rounds and final readiness checks accepted the implementation. The unsaved-history failure through a symlinked account folder found during QA was fixed in #29124, merged normally into
6634a1119dc, and verified with a fresh real session. No open proven source finding remains. Deferred concerns are an unproven never-settling create, persistence cost at scale, and nonidentity phone/window mapping.The current head is
51a3c41919f. Narrow source/readiness review accepted the final merge resolutions, the unchanged import-helper extraction and the launch-admission file taken exactly from main. The focused rendered re-check is complete on5bdfe33331d, as authorized: both tab-menu directions appear while actual History requests remain pending, and Resume in New CLI shows a disabled spinner during preparation. The four menu/focus files are unchanged through the final head. Correct imported history, provider ID/account home and the new CLI's resumed history were verified. All owned rigs, processes, checkouts and throwaway homes are cleaned; real config hashes match.CI is blocked only by main's #29472/#29496 breakage, pending #29499. The mobile correction has already landed on main; the coordinator will merge main up the stack after #29499 lands, watch CI and perform readiness. Exact-head PR and Mobile failure logs were read; the affected files equal the merged main revision. There are zero unresolved review threads and no conflicts, but the current merge state is UNSTABLE because CI failed. No ready marker is posted. This stacks on #29124 on #29119. Never merged.
Agent skill upstream boundary
Notes
Intended differences from the common pattern are external transcript import, the approved menu/header ownership distinction, split-tab placement, shared History recovery, and recovery after an uncertain create or reload. No temporary design deviation is introduced. CLI adoption remains local-only; SSH, paired CLI and WSL withholding remain. Folder workspaces and host-owned status keep their existing paths. Host import may still traverse account storage; no latency bound is promised.