Skip to content

A chat never starts writing a conversation a terminal is still writing, and restored panes respect open chats - #30930

Merged
brennanb2025 merged 49 commits into
mainfrom
brennanb2025/flip-ownership-admission
Oct 25, 2026
Merged

brennanb2025 merged 49 commits into
mainfrom
brennanb2025/flip-ownership-admission

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 54 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3530 $\color{#cf222e}{\Huge{\mathbf{−}}}$​95 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3435
Prod 124 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2504 $\color{#cf222e}{\Huge{\mathbf{−}}}$​442 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2062

ELI5

A Claude or Codex conversation can be open in two places in Orca at once: a terminal running the CLI (claude --resume …, codex resume …) and a native chat tab. Before this PR, both could write to that one conversation at the same time. That happened in two ways:

  1. Reopening a chat. You close a chat tab, keep using the same conversation in a terminal, then reopen the chat and send a message. The chat started its own copy of the agent on the conversation the terminal was still writing.
  2. Restarting Orca or waking a workspace. A terminal pane that had been running a conversation automatically re-runs its resume command, even when that conversation is open in a chat tab. You end up with the terminal and the chat both writing to it.

Two agents writing one conversation file can interleave turns or fork the history.

Now Orca checks first. A chat won't start its agent while a terminal might still be writing the conversation, and a restored terminal won't resume a conversation that an open chat holds.

What Changed

When a chat refuses, and what you see

The check runs each time a chat has to start its agent: when you send a message and the chat's agent isn't running. That covers the first message after reopening the chat tab, after an Orca restart, or from the phone. Opening or viewing the tab never triggers it. If a terminal might still be writing that conversation, the agent is not started. The message stays in the chat marked "Your message was not sent.", with this red notice below it:

Claude is already running this conversation in another terminal. Quit Claude there or close that terminal to continue here.

(The agent name changes to match.) Once the terminal's CLI exits, the next send goes through normally. No timer, no button.

The same check applies to Resume in chat from a terminal tab and opening a conversation from Session History. Both paths show a toast: "{{agent}} is already running this conversation in another terminal. Quit {{agent}} there or close that terminal, then open this conversation from Session History."

Codex has its own lock as well. If Codex's server itself reports that the conversation already has an active writer, the chat shows: "Codex is still holding this conversation open. Try again in a moment, or close other Codex terminals."

What restored terminal panes do after a restart or wake

When Orca restarts or a sleeping workspace wakes, a terminal pane that had an agent conversation normally re-runs its resume command automatically. Before that command runs, the machine running the terminal now reads its saved chat records. It refuses the automatic resume if:

  • a chat that holds this conversation is open as a tab, or
  • a chat's agent may still be writing it (even if the tab is closed), or
  • Orca can't read its chat records, so it can't tell.

A refused pane opens as an ordinary, usable shell with the existing line --- previous session unavailable, started fresh --- at the top. Nothing else runs in it. Orca also drops that pane's saved "resume this conversation" note, so the next restart doesn't try again. The only exception is the "can't tell" case, which keeps the note and checks again next time. If the chat holding the conversation is closed and its agent has stopped, the resume runs as before.

Only automatic restores are checked. A command you type yourself is never changed or blocked. If the terminal's agent survived the restart (Orca's terminal daemon kept it running), Orca just reconnects to it, starts nothing, and shows no started-fresh line.

How detection works

There is no lock file and no new saved field. Orca combines two things it already has on the machine running the terminal:

  1. Which conversation each terminal is running comes from the agent hooks. These are the small reports each agent CLI sends Orca while it runs. They say "pane X is in conversation Y" and, when available, identify the agent's process. Orca keeps that link on the terminal itself, so it lasts exactly as long as that terminal session. Saved resume notes for sleeping or restored panes help find which terminal to check.
  2. Whether that terminal could still be writing comes from the operating system's process list. Orca checks any agent process the hooks identified and, if the terminal still exists, requires its shell to sit alone at its prompt with no child programs. A known process that is still alive or can't be checked still blocks the chat. On macOS and Linux it reads the process table; on Windows it uses Orca's existing terminal process check.

The rule: while the agent's CLI is alive in a terminal, whether it's replying or idle at its prompt, the chat won't start its agent. Once the CLI exits (or the terminal is closed), the next send goes through.

Anything uncertain about an existing terminal or a known agent process counts as "might still be writing": a process Orca can't inspect, or a terminal that changed while it was checking. Losing that evidence never counts as proof that the agent exited.

Edge cases:

  • Other jobs in that terminal: a CLI paused with Ctrl+Z, or any other program still running in that terminal (even an unrelated background command), also refuses, because Orca can't tell it apart from the agent.
  • Terminal closed: the terminal no longer blocks the chat by itself; the shared-server limits below still apply.
  • Workspace asleep: for agents other than OpenCode, a saved resume note alone doesn't block the chat if its terminal is absent or confirmed exited. If that terminal needs to start again while the conversation is open or still running in chat, waking the workspace or opening the pane gives you a plain shell. A dropped resume note isn't restored automatically later.
  • OpenCode after Sleep (intended known limit): a saved resume note may still block chat because a shared OpenCode server may keep writing after the terminal closes; today's generic quit-or-close-terminal guidance remains and can name a terminal that no longer exists.
  • Hooks off: if an agent never reports to Orca (for example its hooks are turned off), Orca can't see that its terminal holds the conversation, so nothing is refused. This follows from the code; no test covers it.
  • SSH and WSL terminals: not counted. Native chats run only on the machine that hosts them, so a conversation inside an SSH or WSL terminal is never a chat's conversation.
  • Paired remote servers: both checks run on the server that runs the chat and the terminal, against that server's own terminals and hook reports.
  • Older paired servers: the restore check depends on a new server capability (agent-session.saved-resume-origin.v1). Older servers keep their existing launch path and don't get the new restore check; a newer client still works with them. New result fields are optional: old servers leave them out and old clients ignore them. No new stream message type and no minimum server version.
  • Agents covered: every agent whose chats can take over a terminal's conversation (Claude, Codex, Grok, OMP, OpenCode, Pi).

Why

The common pattern is to check ownership when the agent starts and to attach to the real live owner. Orca follows that pattern. It reuses the existing check that "Resume in chat" already used, and runs it right before a chat's agent starts, rather than adding a second record of who started what. Orca needs the process-list evidence because people start CLIs in terminals themselves, outside Orca's control. It needs the optional launch-result fields because client and server versions mix.

Alternatives I rejected:

  • Stopping the terminal's agent to make room: this kills the user's work.
  • Rewriting the user's typed command: ruled out.
  • Trusting a timer or a closed window as proof of exit: that is how two writers happen.

Linked Issue

Tracked in #26417. Includes the saved-pane repair from #28288 without changing that draft PR.

Visual Proof

All screenshots are whole-window captures from test copies of Orca on this PR's QA commit. No "before" captures are attached.

Mac, Codex: restart with the chat open

Restored terminal refused Same conversation continues after the chat closes Terminal usable after Codex exits
Codex saved resume refused into a plain shell Original Codex conversation replies in another terminal Authentic Codex CLI-client exit leaves a usable shell
After restart, the terminal pane that used to run this Codex conversation would normally resume it. The chat tab "L7 Codex Native Ready" holds the conversation and is open, so the pane opened as a plain shell with --- previous session unavailable, started fresh ---. After the chat tab was closed, the same conversation was resumed in another terminal. The chat's earlier turn is still in the history, /status shows the same session, and a new prompt gets a reply. Refusing the restore lost nothing. Codex exited in that terminal ("Disconnected from this task. Any running work continues.") and pwd runs at a normal prompt. Codex's message means its shared background server may still hold the conversation; see known limits.

Mac, Claude: chat refused while a terminal is writing

Chat send refused A closed chat doesn't block the terminal Chat works after the terminal's Claude exits
Claude native attempt refused while terminal writer is alive Claude same-conversation terminal continuation replies Claude native conversation has two final replies
On 71e0d77, this existing native chat was reopened while the same conversation’s real terminal Claude was alive. The send shows "Your message was not sent." and the red notice: "Claude is already running this conversation in another terminal. Quit Claude there or close that terminal to continue here." A second Claude conversation, whose chat tab had been closed, continues in a terminal with claude --resume …, its earlier turns intact and a new reply. The same chat as the first image, scrolled. It shows two refused sends; going by its label, the second was sent while the terminal's Claude was paused with Ctrl+Z. After the terminal's Claude exited, two new messages got replies in the chat.

Windows, Claude: Sleep and Wake

Chat intact after Wake Same conversation continues in a terminal Terminal usable after Claude exits
Original Claude native conversation retained after Wake Same Claude conversation replies in Windows terminal Authentic Claude CLI exit returns to PowerShell
The chat after its workspace slept and woke. Its first exchange and two later chat replies are all still there. The same conversation resumed in a terminal after the chat closed. The history includes the two chat turns, and a new terminal prompt gets a reply. /exit ends Claude. It prints "Resume this session with: claude --resume …" and a normal PowerShell prompt returns. The Claude screen above it is leftover scrollback.

Older paired server (Orca 1.4.232), Claude

Older client: restored pane is a usable shell This PR's client: conversation continues
Older client FIRST target shell with confirmed input Final client SECOND distinct reply on original conversation
A restored workspace terminal on the old server. An earlier claude --resume … run is in the scrollback, then the shell runs a typed printf. It shows the old server's launch path still leaves a usable shell. The image alone can't show whether a resume was refused there. Against the same old server from this PR's client, the conversation history has turns from both the chat and the terminal, and a new terminal prompt gets a reply.

Paired remote server running this PR, Codex

Restored pane is a usable shell Same conversation continues after the chat closes
Paired Codex target shell accepts input Original Codex conversation replies after normal native close
The restored pane shows earlier codex resume … lines in its scrollback, no Codex running, and the shell running a typed command. The started-fresh line is not in this frame. After the chat closed normally, the same Codex conversation, including the chat's turn, resumed in a terminal and gave a new reply.

More Codex runs: older server, then Windows

Older server, older client Older server, this PR's client
Original Codex conversation replies in older-client FIRST Original Codex conversation replies in final-client SECOND
A Codex conversation in a terminal. Its history includes a turn made from the chat, and a new prompt gets a reply. The same conversation later, from this PR's client, gets another new reply. The "Enjoying Orca?" popup is unrelated.
Windows: Sleep and Wake with the chat open Windows: cold restart with the chat closed
Windows original Codex conversation replies after OPEN Sleep Windows CLOSED cold CLI exit leaves useful PowerShell
Left: the conversation continues in a terminal with a new reply. Right: a PowerShell split runs a typed command. With the chat tab closed, the conversation was resumed in a terminal, then Codex exited ("To continue this session, run: codex resume …"), and PowerShell runs a typed command.

Testing

  • Real Claude and Codex runs, end to end, on test copies of Orca:
    • Mac local
    • a paired remote server running this PR
    • an older 1.4.232 paired server, used first from an older client and then from this PR's client
    • native Windows, including upgrade from the previous build, cold restart with the chat open and closed, and Sleep/Wake with the chat open and closed
  • Each run checked: refusal → usable shell, closing the chat normally, the same conversation continuing elsewhere with a real reply, the CLI exiting, and the terminal still usable afterwards.
  • Automated tests cover:
    • a chat send refused while a terminal writes, then allowed after it exits
    • restore refusal for open and still-writing chats
    • cancelling the refused resume command on every startup path
    • mixed client and server versions
    • performance contracts showing the check does bounded work for 10 and 100 panes (operation counts, not timing)
  • The retained full QA ran on commit e09187b; its unchanged flows carry across later main merges and reviewed follow-ups. The targeted Claude Sleep → History reply → wake-to-shell flow and genuine live-Claude History refusal were exercised on 71e0d77. CI on 71e0d77 is green (48 successful checks, 17 skipped).
  • Not proved: the Codex chat-owner identity on some paired runs, and the timing of a saved-resume note disappearing late on the second older-server run (cause unknown). These are internal details, not user-visible failures.

Notes

Intended differences

  • Text typed before a refused resume (Brennan, Oct 25): printable text you typed into that pane before its shell was ready stays on the shell's command line, unexecuted, so you can edit or clear it. Enter and control keys are stripped and nothing is run. The started-fresh line marks the pane. This keeps today's editable input instead of adding a separate "recover your draft" surface.
  • Same-conversation chat-to-terminal switching stays off for every agent until the per-agent follow-up. Existing terminal refusals stay. Typed commands are never rewritten, no terminal is stopped to make room, and Ctrl+Z is not treated as exiting. Session History's current fallback to an earlier conversation in a chat's chain stays until that follow-up.
  • Short gap after a terminal starts: a terminal is only known to hold a conversation once its agent's hooks report it. A chat send in the first moments after a terminal starts can get through. Codex's own lock still refuses it with the message above; other agents have no equivalent. No separate "pending start" record was added.
  • Codex background server: Codex's shared server can keep a conversation open after the terminal CLI exits. Orca leaves that server running, so the chat may still be refused by Codex until it lets go (STA-11378).
  • Live agents after a restart: Orca reconnects to an agent that is actually still running, starts nothing new, and shows neither a started-fresh line nor a restored banner. When Orca can't tell which account home a conversation belongs to, it may refuse to be safe.
  • Mixed versions: covered under "How detection works" above.

Known limits and follow-ups

  • Inherited from current main: Session History’s refused "Resume in New Chat" can leave an empty provisional chat tab with "Chat could not be started." and Retry alongside its refusal toast; removing the empty tab and duplicate failure is in STA-12161.
  • The notice doesn't yet name or link the terminal or offer to close it; tracked in STA-12161.
  • On Windows, the chat's history doesn't show turns added later in a terminal, in both the previous and the new build. Tracked in STA-11703.
  • Inherited from main: a pane split that should retry an existing command can start a fresh one instead. It is on a layout path switched off in shipped builds. Tracked in STA-11918.
  • Eight layout test failures that also fail on main are disclosed and unrelated.
  • Inherited from main:
    • If a resume was sent but its reply was lost before a terminal was identified, and no later hook report arrives, Orca can keep refusing that conversation in other panes; the same pane can retry.
    • Failing to save a new terminal's first binding still fails terminal creation.
    • A terminal created from the phone can briefly show in the active tab group before it moves.
  • Unproved concern: a late startup delivery might drop a saved resume note without running its command. Two bounded attempts to reproduce it were inconclusive. If proved, it would block this PR.
  • The existing started-fresh wording describes a plain shell but can read as if a new agent started. This PR keeps that wording.

…uses to start while a terminal writes its conversation

Each chat link now carries its role (head or earlier) and key; Session History names
the chat continuing a conversation first, duplicate adoption checks only head links in
both the pre-commit check and the store transaction, and terminal resumes stay refused
exactly as before. The terminal-writer check now also runs inside acquireOwner before
the spawn, refusing with the typed pre-spawn reason conversationOpenInTerminal.
…l reports it

An in-memory registry of managed terminal starts per conversation, registered in the
same step as the resume admission (terminal.send with a resume command, createTerminal
with a command), bound to the PTY execution that runs it, and ended only when that
terminal's hooks report the conversation or the execution is gone. A chat's agent
start refuses while an entry may hold its conversation.
… an open chat continues

Resume recipes built from a pane's saved facts (cold restore, deferred and late reattach,
sleeping wake, host mobile materialization) carry resumeOrigin 'saved'. The execution host
decides before any command is issued: while an open chat continues the conversation, or a
chat may be writing it, the pane starts its plain shell with the started-fresh notice and
its saved claim is forgotten; with unreadable records only a saved restore is refused and
its record kept. An admitted resume registers its managed start in the same step, so the
chat's agent start refuses until the terminal reports it or exits. Clearing the last saved
record now reaches disk.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 20, 2026 13:25
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 25a048c8-e159-40ff-99c7-65f26b04443f
📥 Commits

Reviewing files that changed from the base of the PR and between 5e78554 and cbd096a.

📒 Files selected for processing: 27
  • src/main/codex/codex-structured-thread-open.ts
  • src/main/ipc/pty/ipc/spawn-execute.ts
  • src/main/ipc/pty/ipc/spawn-types.ts
  • src/main/ipc/pty/pane/stable-owner.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-orchestration.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.ts
  • src/main/runtime/agent-session-reservation-admission.ts
  • src/main/runtime/session-tabs/structured-session-cli-writer-host.ts
  • src/main/runtime/structured-agent-cli-writers.test.ts
  • src/main/runtime/structured-agent-session-runtime.ts
  • src/main/runtime/terminal/launch/terminal-create.ts
  • src/main/runtime/terminal/launch/terminal-launch-result.ts
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • 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/zh.json
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-failure.ts
  • src/shared/agent-session-refusal-details.ts
  • src/shared/agent-session-refusal-reason-words.ts
  • src/shared/protocol-version.ts
🚧 Files skipped from review as they are similar to previous changes: 8
  • src/renderer/src/i18n/en-runtime-required.json
  • src/shared/agent-session-failure-copy.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json

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

Walkthrough

The change adds ownership checks for structured conversations and admission checks for saved PTY resumes. It carries resume decisions and terminal launch results through host, runtime, preload, and renderer paths. Refused or unverifiable resumes receive distinct handling, and cleanup checks timestamps and conversation identity before changing saved records or status. Renderer startup delivery now checks cancellation and current state. The change also adds writer-conflict errors, localized feedback, and tests for ownership, resume admission, result delivery, and cleanup.

Priority: Normal

Merge Risk: Moderate · up to cbd09

A temporary remote capability-check failure can leave later saved terminal restores without the check that protects an open chat. Resolve that path before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 39.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 88 functions across 87 files. (7 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the user impact, implementation, rationale, linked issues, testing, limitations, and compatibility considerations. It does not fully follow the required template: the Visual P… Add the missing template sections and complete them. Provide before-and-after visual proof, or explain why the change has no visual or interaction impact. Link the issue in the required Linked Issue/Fixes # format. Complete the Review, Agen…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the two primary changes: blocking concurrent chat and terminal writers, and making restored panes respect open chats. It is specific and related to the changeset.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 39.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 88 functions across 87 files. (7 skipped: 7 unsupported.)

Resolution

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

Full details: Description check

Explanation

The description explains the user impact, implementation, rationale, linked issues, testing, limitations, and compatibility considerations. It does not fully follow the required template: the Visual Proof section has no before captures, and the Review, Agent skill upstream boundary, and Checklist sections are missing. The issue is referenced as #26417 but is not provided in the required Fixes # field.

Resolution

Add the missing template sections and complete them. Provide before-and-after visual proof, or explain why the change has no visual or interaction impact. Link the issue in the required Linked Issue/Fixes # format. Complete the Review, Agent skill upstream boundary, Notes, and Checklist items, including the current validation status and known merge blockers.

✨ 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: 242c924f-b081-4a33-bb04-24d95c5ee508
📥 Commits

Reviewing files that changed from the base of the PR and between da0db9f and 3fb0bd6.

📒 Files selected for processing: 120
  • src/main/agent-hooks/server/server-tab-cleanup.ts
  • src/main/ai-vault/structured-session-ownership.test-support.ts
  • src/main/ai-vault/structured-session-ownership.test.ts
  • src/main/ai-vault/structured-session-ownership.ts
  • src/main/codex/codex-structured-thread-open.test.ts
  • src/main/codex/codex-structured-thread-open.ts
  • src/main/ipc/pty-codex-account-attribution.test.ts
  • src/main/ipc/pty-daemon-spawn-agent-home-env.test.ts
  • src/main/ipc/pty-ipc-mock-registry.ts
  • src/main/ipc/pty-ipc-suite-environment.ts
  • src/main/ipc/pty-spawn-codex-home-unavailable.test.ts
  • src/main/ipc/pty-spawn-env-codex-resume-provenance.test.ts
  • src/main/ipc/pty-spawn-saved-resume-admission.test.ts
  • src/main/ipc/pty/host-env/saved-resume-admission.ts
  • src/main/ipc/pty/ipc/spawn-commit.ts
  • src/main/ipc/pty/ipc/spawn-env-codex.ts
  • src/main/ipc/pty/ipc/spawn-execute.ts
  • src/main/ipc/pty/ipc/spawn-run.ts
  • src/main/ipc/pty/ipc/spawn-state.ts
  • src/main/ipc/pty/ipc/spawn-types.ts
  • src/main/ipc/pty/pane/stable-owner.ts
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/ipc/pty/runtime/spawn-early.ts
  • src/main/ipc/pty/runtime/spawn-execute.ts
  • src/main/ipc/pty/runtime/spawn-preflight-saved-resume.test.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/ipc/pty/runtime/spawn-state.ts
  • src/main/ipc/pty/runtime/spawn.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-acquisition.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-orchestration.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-failed-create-refusal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-open.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-terminal-writer-acquire.test.ts
  • src/main/native-chat/agent-session-wire/structured-provider-session-ownership.ts
  • src/main/native-chat/structured-agent-session-history-adoption.test.ts
  • src/main/native-chat/structured-agent-session-history-adoption.ts
  • src/main/native-chat/structured-conversation-key.ts
  • src/main/providers/pty-spawn-result.ts
  • src/main/runtime/agent-session-reservation-admission.test.ts
  • src/main/runtime/agent-session-reservation-admission.ts
  • src/main/runtime/cli-terminal-create-host-session-binding.test.ts
  • src/main/runtime/hook-status-resume-sleep-ordering.test.ts
  • src/main/runtime/rpc/methods/terminal/terminal-lifecycle-methods.ts
  • src/main/runtime/runtime-pty-controller-contract.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/main/runtime/runtime-terminal-state-records.ts
  • src/main/runtime/session-construction/agent-session/get-agent-session-execution-namespace.ts
  • src/main/runtime/session-lifecycle/projection/perform-mobile-session-pty-records-refresh.ts
  • src/main/runtime/session-tabs/structured-session-cli-writer-host.ts
  • src/main/runtime/session-tabs/structured-session-create-support.ts
  • src/main/runtime/structured-agent-session-runtime.ts
  • src/main/runtime/terminal/launch/mobile-terminal-owned-create.ts
  • src/main/runtime/terminal/launch/terminal-create.ts
  • src/main/runtime/terminal/launch/terminal-launch-result.ts
  • src/main/runtime/terminal/stop/worktree-sleep-resume-recording.ts
  • src/main/runtime/workspaces/workspace-process-listing-dependencies.ts
  • src/main/runtime/workspaces/workspace-process-listing.ts
  • src/preload/api/pty-api.ts
  • src/preload/api/pty-bridge-session-control.ts
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/renderer/src/components/tab-bar/cli-chat-resume-feedback.ts
  • src/renderer/src/components/terminal-pane/ipc-pty-connect-result.ts
  • src/renderer/src/components/terminal-pane/ipc-pty-connect.ts
  • src/renderer/src/components/terminal-pane/ipc-pty-spawn-request.ts
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection/apply-reattach-payload.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts
  • src/renderer/src/components/terminal-pane/pty-connection/connect-pane-pty.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-cold-restore-and-snapshot.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/fresh-spawn-start.ts
  • src/renderer/src/components/terminal-pane/pty-connection/fresh-spawn-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection/hidden-agent-resume-deferral.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-serializer-settle.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-transport-options.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-session.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler.ts
  • src/renderer/src/components/terminal-pane/pty-connection/saved-resume-cancellation.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/saved-resume-startup-cancellation.ts
  • src/renderer/src/components/terminal-pane/pty-connection/sleeping-record-access.ts
  • src/renderer/src/components/terminal-pane/pty-connection/spawn-deferred-sleep.ts
  • src/renderer/src/components/terminal-pane/pty-connection/title-spawn-bell.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-session-launch.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-spawn-intent.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/hooks/ipc-events/agent-status-listeners.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • 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/zh.json
  • src/renderer/src/lib/forget-refused-pane-resume.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/renderer/src/lib/workspace-session-patch.test.ts
  • src/renderer/src/lib/workspace-session-patch.ts
  • src/renderer/src/store/terminals/terminal-actions.ts
  • src/renderer/src/store/terminals/terminal-state.ts
  • src/shared/agent-session-attachment-failure-words.ts
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-failure.ts
  • src/shared/agent-session-host-authority.ts
  • src/shared/agent-session-refusal-details.ts
  • src/shared/agent-session-refusal-reason-words.ts
  • src/shared/agent-session-resume.ts
  • src/shared/agent-status-ipc-payload.ts
  • src/shared/agent-status-types.ts
  • src/shared/protocol-version.ts
  • src/shared/rpc-contract/agent-session-params.ts
  • src/shared/rpc-contract/terminal-unary-params.ts
  • src/shared/runtime-terminal-contracts.ts
  • src/shared/structured-agent-session-dispatch-rejection.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.

Comment thread src/main/runtime/terminal/launch/terminal-create.ts Outdated

@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: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f5e5e3e4-8e40-47c5-9e48-16d0ca83e837
📥 Commits

Reviewing files that changed from the base of the PR and between 3fb0bd6 and ef3282e.

📒 Files selected for processing: 24
  • src/main/runtime/cli-terminal-create-host-session-binding.test.ts
  • src/main/runtime/rpc/methods/terminal-stream-extraction-characterization.test.ts
  • src/main/runtime/rpc/methods/terminal/terminal-multiplex-initial-snapshot.ts
  • src/main/runtime/rpc/methods/terminal/terminal-multiplex-subscribe-frame.ts
  • src/main/runtime/rpc/terminal-multiplex-test-harness.ts
  • src/main/runtime/terminal/recovery/resolve-terminal-pane.ts
  • src/renderer/src/components/terminal-pane/pty-connection/apply-reattach-payload.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/fresh-spawn-start.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-session.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler-park-reveal-verdict.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/saved-resume-startup-cancellation.ts
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-launch-result-policy.ts
  • src/renderer/src/components/terminal-pane/pty-connection/transport-output-callbacks.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-saved-result-consumer.test.ts
  • src/renderer/src/runtime/remote-runtime-terminal-multiplexer-types.ts
  • src/renderer/src/runtime/remote-runtime-terminal-response-controller.ts
  • src/shared/runtime-terminal-contracts.ts
  • src/shared/terminal-attachment-launch-result.ts
  • src/shared/workspace-session-sleeping-agents.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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Clear the saved-origin probe cache after transient… · remote-runtime-pty-transport.ts:3146-3162

src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts:3146-3162
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Clear the saved-origin probe cache after transient failures.

runtimeEnvironmentSupportsCapability can reject while status.get is unavailable. The transport then caches {} in savedOriginOptions. Later connects can reuse that value and omit resumeOrigin. Since admitResumeSpawn checks ownership only for resumeOrigin: 'saved', the native-chat refusal can be skipped.

Suggested fix
               } catch (error) {
                 if (isRuntimeCompatBlockError(error)) {
                   throw error
                 }
+                // Why: a transient probe failure is not a capability answer; let the next connect probe again.
+                savedOriginOptions = undefined
                 return {}
               }

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b6afc1a1-13b8-489d-a20c-6d854a39a8ba
📥 Commits

Reviewing files that changed from the base of the PR and between ef3282e and 772cd37.

📒 Files selected for processing: 5
  • src/main/runtime/cli-terminal-create-host-session-binding.test.ts
  • src/main/runtime/rpc/methods/terminal/terminal-multiplex-initial-snapshot.ts
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-launch-result-policy.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-saved-result-consumer.test.ts
🚧 Files skipped from review as they are similar to previous changes: 2
  • src/main/runtime/rpc/methods/terminal/terminal-multiplex-initial-snapshot.ts
  • src/main/runtime/cli-terminal-create-host-session-binding.test.ts

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

@brennanb2025

brennanb2025 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Reopening native chat could start its agent while a terminal was still writing the same conversation. Automatic terminal restoration could also restart a conversation belonging to an open native chat. This PR checks ownership immediately before acquisition and gives a conflicting fresh restore a usable shell while preserving the conversation.

Bounded followup completed on the published head. Published head 71e0d77c592c6861d324abd2f9e7a434939122c1, tree 1dca2ab06c4d7c804d3372464c5a03ef8dfcc3d5, parent 43a1712b0a8479d642cc2c05eeb7910edf156e2e. Independent retained review is AGREE on this exact object; no unresolved concrete source defect was found in the bounded correction. This is not a new general review round: three general rounds, accepted rulings and inherited limitations remain. Current-head CI and the separately audited finite runtime results are recorded below; the final merge decision remains Brennan’s.

After the main merge 972b35fa and import-only correction 7a688b82 described below, copy commit 686cb025 names the actual agent in the refusal and distinguishes quitting it from closing its terminal. Resume-in-chat and History guidance ends by directing the user to Session History; the Codex-own-lock message remains distinct. Independent copy review agreed, with the separate 223-test evidence below. Old or unknown host facts can still retain their original host prose.

Admission commit 43a1712b allowed a non-OpenCode saved note without an actual terminal to stop blocking chat. Review then reproduced a race: current row A had no saved match, stable saved B awaited inspection, and A changed before the final decision. Correction 71e0d77c retains each inspected observation and physical-terminal proof independently of saved-note coverage and validates those proofs synchronously at final admission. Actual uninspectable terminals, live or unverifiable processes, detached writers and inconsistent or sleeping physical panes remain conservative. This is a recheck of inspected evidence, not a universal lock against independently starting CLIs. Key source/test points: retained row proof, final validation, controlled-await regression.

Final shipped delta from 7a688b82 to 71e0d77c: 65 gross production additions / 51 deletions, including translations (37/23 code and 28/28 catalogs). The authorized fallback removes the optional OpenCode-specific reason and server message completely; its 27 dependent paths match copy commit 686cb025. The existing OpenCode saved-note guard remains: it can refuse after Sleep because an external shared server may still write, but the saved note does not prove a server is alive. Today's generic quit-the-agent/close-the-terminal guidance remains and can refer to a terminal that no longer exists. This is an intended known limitation, not a shipped server-specific explanation. Terminal links, a Close-terminal button, navigation and automatic retry remain deferred, tracked in STA-12161. Retired resume recipes are not automatically restored.

Test receipts are separate, not a cumulative current-head pass count:

Receipt / scope Actual outcome and limit
Copy 686cb025: refusal-copy-evidence/test-receipt.json and its two logs 6 desktop files / 218 passed; 1 mobile file / 5 passed: 223 total for that copy object.
Race reproduction: refusal-sleep-race-fix-evidence/no-saved-red.log On 43 production, 1 failed / 13 skipped: row replacement was incorrectly admitted. This is the reproduced defect, not a passing result.
refusal-sleep-race-fix-evidence/named-tests.log 12 named files / 346 passed, before the final independent-B-terminal fixture tightening. Includes acquire/send, copy consumers, precommit and existing N10/N100 census contracts. Not a blanket final-tree 346-pass claim.
refusal-sleep-race-fix-evidence/writer-stable-and-wake.log Final 15 writer tests plus 2 targeted live/worktree-sleep claim controls: 17 passed / 1516 skipped, across 2 files. Stable controls and row/terminal appearance or replacement cases exercised; not the full runtime suite or every retained share branch.
refusal-sleep-race-fix-evidence/mobile-tests.log 1 file / 5 passed. No mobile runtime or screenshot claim.

The normal commit hook passed with no committed tree churn. Its generated package-manager metadata was restored to the incoming bytes; no lock change was committed. These are hook/test receipts, not an executed compiler or current CI result.

Accepted fresh matching refusal settlement still releases only that operation's share before publication; physical/adopted owners and mismatched, historical or unknown outcomes remain conservative. Source validation, result receipts, cancellation and metadata contracts carry. Existing whole-mechanism reference and checklist qualifications carry where unchanged; the independent correction review checked the changed proof retention. Five bounded performance contracts and their N/10N operation-count limits carry: final proof checks add no process query, and no general linearity, latency, CPU or heap claim follows.

Current-head CI: the sole watch on 71e0d77c finished successfully. GitHub reports 48 successful checks and17 skipped, including static analysis/typechecks, changed E2E, layout, packaging and compatibility in workflow40229144904. The post-watch checkpoint reported CLEAN/MERGEABLE and out of draft. No failed-job rerun was needed on this head.

M4Air ticket2388, finite Claude followup — independently audited AGREE on 71e0d77c. A genuine Claude CLI conversation replied, then ordinary Sleep produced the exact product PTY exit event and a same-pane pending recipe. Session History opened that same conversation in native chat and received a real reply while the original pane remained pending. Selecting that saved pane produced a plain zsh shell, printed a harmless nonce and returned its prompt; the chat’s reply and usable composer remained. A separate genuine Claude conversation replied in its CLI, stayed alive through the History attempt and refused opening in chat with the exact final toast. This is the explicitly requested finite Mac Claude followup; unchanged provider/platform journeys on e09187b carry without replay.

The refusal image proves the History toast, ending “then open this conversation from Session History.” The provisional native tab also shows generic “Chat could not be started.” and Retry; no Retry or native prompt was taken. A bounded source comparison with the retained e091 and accepted7a objects confirms that the provisional tab, generic banner and Retry presentation predates686/43/71; only the approved toast words changed. This remains an inherited visible qualification, with no new regression established. It does not prove the chat-notice variant ending “to continue here.” Product Sleep exit/recipe, matched OS identity/absence, native request/reply and shell-result evidence support the finite results. Raw Sleep return and actual materializer/settlement/cancellation keys were unavailable; no fresh/adopted-result, B-share, kernel-exit or universal single-writer proof is inferred. No later explicit resume or automatic retired-recipe revival is claimed.

The installed stop helper reported graceful Browser.close/root-tree stop and the keeper recorded runner exit0. All28 recorded process identities were absent afterward, with no recorded survivor; real-config hashes were unchanged. This is positive helper/keeper evidence plus bounded per-process absence, not per-process kernel teardown proof. Unrecorded Playwright-daemon exit remains qualified. Ticket2388 is released, the lead is closed and all owned transfer terminals are closed. Source/index remained unchanged. Raw logs/profiles are retained privately; no homes/auth/config values were archived.

Same conversation replies after Sleep Saved terminal opens as plain shell Live Claude refuses History reopening
pr30930-P30930_2388-native-after-sleep.png pr30930-P30930_2388-wake-plain-shell.png pr30930-P30930_2388-claude-live-refusal.png

All three are original uncropped1710×1073 captures on 71e0d77c, inspected by the lead, root and independent auditor. The onboarding popover is visible in the first two; it does not obscure the reply or shell result. Pixels establish these visible outcomes alongside the recorded identities, not general process-safety proof.

The PR body’s historical e09187b marker and17 image captions remain unchanged. Its finite evidence carries for unchanged flows; ticket2388 adds the explicitly assigned runtime flow and toast-copy proof on71. The completion marker below records review and qualified QA completion on71 with that per-flow carry, rather than claiming a replay of the older matrix.

Conflict-blocking main sync and mechanical CI correction — Oct25 18:44Z. Pushed merge 972b35fa15c401a93e44182cbe686d05a428693b (tree b440aa4b0748575b69fb721170e91e9ee54831c4, main 76029bf74ed41660cd495bad796ace27f865bde8). The required scoped hook passed without tree churn. Independent narrow review agrees that the five conflict resolutions preserve both parents' intent: relocated test imports retain the admission fixtures, and the runtime record retains both the saved launch result and main's optional exported-pane key. Relevant automatic overlaps preserve accepted ownership, result/source cleanup and compatibility contracts. No concrete broken previously exercised flow or merge-caused description contradiction was found. The merge's CI failed a duplicate-module-import warning. Both failed jobs were inspected (static analysis and its aggregate gate). Import-only correction 7a688b82caf3d1bc60175e1193f43b1ca538bc0b is pushed, with the normal commit hook passing and independent narrow review agreeing that bindings, module evaluation and all remaining source bytes are preserved. CI on the correction is green: 47 successful checks and18 skipped in workflow40222643077. At that checkpoint, GitHub reported CLEAN/MERGEABLE. The subsequent bounded copy and note-only sleeping-pane admission correction is now committed and independently source-accepted at71 as detailed above; its current CI and targeted runtime/screenshot evidence remain pending in this candidate. The terminal link and Close-terminal action are deferred, tracked in STA-12161. Three general review rounds and all prior accepted rulings and qualifications carry.

Intended refused-resume input (Brennan, Oct25): When resume is refused, text typed before the shell was ready stays on the shell's command line, unexecuted; the user can edit or clear it. Enter and control sequences are stripped from this same-pane user input, and the bracketed paste adds no Enter. The existing previous-session-unavailable / started-fresh line identifies the shell. This keeps today's editable input rather than adding a separate draft-recovery surface.

The earlier finite Claude/Codex runtime assignment is complete, with the limits below; it does not cover the new admission followup. Its QA head remains e09187b587e9b9c7dec15e9e4b60e42b0503ed7a; a main merge alone does not invalidate those completed outcomes. CI on that QA head was green (46 successful,18 skipped), including a failed-job-only retry after runner loss. The previous merged head passed workflow 40193696436. The new merge's duplicate-import warning is corrected; CI on 7a688b82caf3 is green (47 successful,18 skipped).

Completed journeys Evidence and limits
Mac local, Claude and Codex Fresh saved-resume refusal yielded a usable shell; normal native close; unchanged same-conversation resume elsewhere; real reply; authentic CLI-client exit and usable shell, while the original refusal shell remained alive. Captured source cancellation was observed.
Current/current paired, Claude and Codex Ordinary saved-target entry/result, usable shell, normal native close, same-conversation reply elsewhere and authentic CLI-client exit with the original physical shell retained. Live native ownership and the conditional claim callback were not established. Codex host recipe was absent at its first postentry read; its retention timing remains unproved.
Official1.4.232 host, exact older client FIRST, Claude and Codex Genuine saved-pane entry yielded usable input and matching before/after recipe samples, then normal close, same-conversation reply and authentic CLI-client exit. Codex live native-owner identity at consuming entry was corroborated by its OS receipt and later positive exit. Legacy suppression provenance and global single-writer behavior are unproved. Actual Codex input was the original Setup pane, not the earlier separate target.
Same progressed official1.4.232 host, final client SECOND, Claude and Codex Actual ordinary entry, usable shell, same-conversation continuation/reply elsewhere, authentic CLI-client exit and retained original post-entry shell. Codex native setup was refused for an active writer and never retried; no live native owner was established for that entry. Exact recipe samples matched before/after entry; later recipes were absent or replaced with a live record, with timing/caller/cause unassigned. No whole-journey preservation or atomic-dispatch equality is claimed.
Native Windows Retained Claude lifecycle journeys and both agents’ two final native replies. The remaining Codex genuine previous-build save/upgrade, OPEN/CLOSED true cold and actual Git OPEN/CLOSED Sleep/Wake entries and assigned same-conversation replies/CLI exits/useful shells are complete. CLOSED cold used candidate-captured recipe on previous-build C/profile. W2’s first original-shell check failed because preparatory Control+u prefixed the command; it was not replayed. Its later continuation/exit succeeded. W4 retains stop_unverified and unproved native-write-owner attribution. W5 remount/readiness carries; standalone visual/reload campaigns were not added.

The fresh matching claim-settlement callback, conditional registered-entry/timer cleanup, historical/adopted or ambiguous receipts and optional old-host result fields remain source/contract-qualified. Their conditional arms were not all observed live. Missing optional fields do not require another completed-journey replay. Codex CLI exit means client exit, not background-server shutdown. Existing conservative overlap and unknown-dispatch protection can remain held without an expiry guarantee.

Known limits remain visible: native History omits newer CLI turns in the Windows previous and candidate builds (STA-11703); the earlier Claude OPEN Sleep stop failure and later qualified followthrough remain recorded. Eight independently reproduced baseline main-layout failures and the inherited pane retry issue (STA-11918) remain disclosed. Operation-count contracts prove bounded work for the tested populations, not latency, heap, CPU or complete native teardown. No new source defect was established by the bounded evidence audits.

Both historical finite-journey QA tickets are released; this does not describe the newly admitted ticket2388. Recorded app/daemon cleanup has positive exit receipts; final allocated listeners and known survivors were absent, and real config hashes were unchanged. A naturally settled Mac utility lacks a prearmed exit event and is only reported absent. No foreign rig was reused or stopped.

For Brennan’s review: the retained whole-window captures below show the stated local and Windows Claude outcomes on their original heads. All captures retain their original heads and limits; none certifies the new71 admission flow or final-copy screenshot.

Local Codex refusal shell Same conversation replies elsewhere Authentic CLI exit / usable shell
Codex saved resume refused into a plain shell Original Codex conversation replies in another terminal Authentic Codex CLI-client exit leaves a usable shell
Local Claude refuses a live writer Same conversation replies elsewhere Two native replies after CLI exit
Claude native attempt refused while terminal writer is alive Claude same-conversation terminal continuation replies Claude native conversation has two final replies
Windows Claude original native conversation after Wake Same conversation replies in terminal Authentic CLI exit / PowerShell
Original Claude native conversation retained after Wake Same Claude conversation replies in Windows terminal Authentic Claude CLI exit returns to PowerShell

These captures retain their original heads and stated limits.

Older-host compatibility, Claude (qualified completed evidence): exact older client FIRST returned the original target shell with usable input. The final client SECOND on the same progressed official 1.4.232 host reached the distinct same-conversation reply after normal native close. These images support the table above; the late recipe absence remains unattributed.

Exact older client FIRST: target shell/input Final client SECOND: same conversation replies
Older client FIRST target shell with confirmed input Final client SECOND distinct reply on original conversation

Current/current paired Codex: the refusal shell accepts ordinary input, then the original conversation replies elsewhere after normal native close. The raw audit and authentic CLI-client exit support this completed journey; the ownership and recipe-timing limits above remain.

Paired target: usable shell Original conversation: distinct real reply
Paired Codex target shell accepts input Original Codex conversation replies after normal native close

Final finite Codex proof: older-client FIRST and final-client SECOND show distinct replies on the original conversation. Windows shows OPEN Sleep followthrough and useful PowerShell after CLOSED cold reply/exit. These whole-window images were hash-verified and personally inspected; the qualifications above apply.

Older-client FIRST reply Final-client SECOND reply
Original Codex conversation replies in older-client FIRST Original Codex conversation replies in final-client SECOND
Windows OPEN Sleep same-conversation reply Windows CLOSED cold authentic exit / useful shell
Windows original Codex conversation replies after OPEN Sleep Windows CLOSED cold CLI exit leaves useful PowerShell

Main merges after the retained QA head are 86b0af9679c8f9dcb83dd8937a2afeead1f64acc, 8f99fbaf3f903a7ada273872cb4a590020607357, f26bdadc5d60a5241c3e9dacf572b25d164db1e2, a25efaad72db44d30fb8234ad7bf222ebfb640e1, 932116ff23cba18b3534d82c30253a18cdf0ca95 and 23219865baa401682e78234706354f7bd75431ee and 972b35fa15c401a93e44182cbe686d05a428693b. Each integration has independent narrow review. The latest five conflict resolutions retain both parents' intent without an independent production correction or new policy. The subsequent import consolidation 7a688b82caf3d1bc60175e1193f43b1ca538bc0b preserves every non-import source byte; its normal hook and independent review passed. CI on 7a688b82caf3 is green. Copy686, initial admission43 and corrected admission71 follow these merges/import correction; their distinct source/test qualifications and completed targeted evidence are stated above. Completed QA was not replayed for the merges. The new status completion marker names71; the older unchanged-flow QA and its limits remain explicit. The body received only13 exact authorized replacements:12 copy/detection/known-limit corrections and one factual Testing sentence. Reverse proof and exact readback preserve every other byte, including its LoC block,17 image URLs/captions and historical body marker. Merge notes remain in this comment.

Targeted in-chat notice proof and current-main attribution (Oct 25)

The missing chat-send capture is below: a real terminal Claude is alive on the same conversation, and the existing native chat’s send is refused on 71e0d77. It shows “Your message was not sent.” and “Claude is already running this conversation in another terminal. Quit Claude there or close that terminal to continue here.” This is the in-chat notice, separately from the earlier History-toast capture. The PR body’s “Chat send refused” image/caption was replaced; its other 16 images, LoC block and historical marker were preserved.

Chat send refused with current Claude notice

History’s empty failed tab is inherited from actual current main, compared at e26e4185bc4a5a0b4f07d142d623d6fca911f719 against 71e0d77c592c6861d324abd2f9e7a434939122c1. This is a source comparison, not a main runtime claim. For the same eligible local Claude History row with an actual live terminal writer, both versions open the provisional tab, refuse create, retain the failed tab, and show the generic banner/Retry alongside the History toast. The PR changes the toast wording; it did not introduce that combination.

Causal step Current main PR head
Provisional tab opens before create succeeds structured-agent-session-provisional-tab.ts:200 same file:200
Resume create checks terminal writers structured-session-create-support.ts:221 same file:221
A genuine live writer refuses structured-agent-cli-writers.ts:158 same file:157
Refusal retains the visible provisional tab launch-outcome-tracking.ts:39 launch-outcome-tracking.ts:39
Failed chat renders generic banner and Retry native-chat-structured-session-notices.ts:32 same file:32
History independently shows its toast ai-vault-session-resume-in-chat-launch.ts:100 same file:100

Added one known-limit line to the PR body and appended this cleanup to STA-12161, with normalized description readback verified. No ticket comment or production change was made. The existing review/QA limits and marker remain; no passed matrix was replayed. Fresh M4Air ticket2411 exercised only the missing in-chat cell on 71e0d77: real native seed, ordinary close, same-conversation terminal resume, existing native reopen, one refused send. PID/start/image and same conversation were verified before/after capture. Exact full-window PNG (1710×1073) SHA256: ed59356dc2bc3f70e22015c00b722e2813033151b515050925b194cde937dd13. Own app stopped through the installed graceful helper; driver exit0; all 15 recorded app-process identities absent; real-config hashes unchanged; ticket released. Per-process absence is not a kernel exit receipt; independent original native-agent and Playwright-daemon exit proof remains unavailable and qualified. No new commit or CI rerun was needed.

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