Repository navigation
Description
Short summary
On Windows, Orca's protocol-v20 terminal daemon exited while several worktrees were being removed with orca worktree rm --force. Two unrelated split-pane sessions in a different repository were terminated with exitCode: -1, and their pane layout disappeared from the sidebar. The main Orca app stayed running and automatically started a replacement daemon.
The worktree-removal sequence is strongly correlated with the failure, but I have not reproduced it deterministically yet.
What happened?
An agent was retiring four completed worktrees in one repository using four sequential/chained commands of this form:
orca worktree rm --worktree path:C:/Users/<user>/orca/workspaces/<repo>/<worktree> --force --jsonThe targeted worktree sessions were killed as expected. Immediately after the last removal, the existing terminal daemon stopped logging and disappeared. Two active split panes belonging to a completely different repository were also lost.
When the unrelated repository was activated again, Orca showed only a newly created terminal instead of the previous split layout.
Timeline (UTC)
12:21:28— both unrelated split-pane sessions successfully attached.12:22:25,12:22:29,12:22:33— daemon loggedsession-killedevents for the worktrees intentionally being removed.- After the final removal event, the old daemon log ends abruptly. There is no daemon shutdown event and no normal
session-exitedevent for the unrelated panes. 12:24:00— Orca started a replacement protocol-v20 daemon on the same named pipe.12:24:52— the two unrelated sessions were recorded as ended withexitCode: -1.12:24:57— activating the unrelated repository created a new single terminal session.
The main Orca Electron process remained alive throughout, so this appears isolated to the terminal daemon/PTY host rather than an application crash.
Expected behavior
Removing a worktree with --force should stop only terminals associated with that worktree. Unrelated terminals and split-pane layouts in other repositories should remain alive.
If the terminal daemon does fail, Orca should restore or clearly report affected sessions rather than silently replacing the layout with a fresh terminal.
Actual behavior
- The protocol-v20 terminal daemon exited or was terminated.
- Unrelated local terminal processes disappeared.
- Two unrelated panes ended with
exitCode: -1. - The split layout was lost from the sidebar.
- The next activation created a new single terminal.
- Terminal output history and checkpoints were preserved on disk.
Environment
- Orca daemon host:
1.4.135 - Terminal daemon protocol:
20 - OS: Windows 11 Home,
10.0.26200, 64-bit - Shell: Windows PowerShell
- Main Orca app remained running and the runtime/graph returned
readyafter recovery.
Diagnostic evidence
Old daemon:
pid: 38368
started: 2026-07-11T06:21:39Z
socket: \\?\pipe\orca-terminal-host-v20-...
Replacement daemon:
pid: 54832
started: 2026-07-11T12:24:00Z
socket: \\?\pipe\orca-terminal-host-v20-...
Both unrelated session metadata files ended similarly:
{
"endedAt": "2026-07-11T12:24:52.983Z",
"exitCode": -1
}There was no Windows Error Reporting entry or crash dump for the daemon, and the daemon log contains no stack trace. This may indicate a forced termination or an unhandled failure path that exits before logging.
Reproduction candidate
- Open multiple local terminal panes in repository A.
- Create several worktrees with active terminal sessions in repository B.
- Remove the repository-B worktrees rapidly/sequentially using
orca worktree rm --force --json. - Watch whether the protocol-v20 daemon exits and whether repository-A panes disappear.
- Activate repository A again and inspect whether the old split layout is replaced by a new terminal.
I can provide a sanitized daemon-log excerpt and the preserved terminal metadata/checkpoints if useful.
Activity
Merge origin/main: re-scope stablyai#8284 to the stablyai#8275 core; …
OrcaWin commentedon Jul 17, 2026
Agent reproduction package (Windows orchestration 2026-07-16)
Host context: Windows 11 / Orca 1.4.143.0 / repo path used:
docs/bug-reproductions/Labels applied: see issue labels (
has_reproorcannot_repro).Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.
Issue 8275 — Terminal daemon dies after batch worktree removal
Status:
cannot_reproHost: Windows 11, Orca app 1.4.143 / daemon-host materialization
1.4.142-rc.2, protocol-v22 daemon pid stableLabel:
cannot_reproSummary
Reporter (1.4.135, protocol-v20): rapid
orca worktree rm --forceon several worktrees killed the terminal daemon; unrelated split panes in another repo ended withexitCode: -1and layout was replaced.Attempt on this host (2026-07-16)
daemon-v22.pidappVersion1.4.142-rc.2.main(C:/Users/neil/orca/orca).repro-8275-batch-{1..4}-*each with a live terminal.orca statusruntime/graph ready.Expected vs actual (this attempt)
Evidence
docs/bug-reproductions/evidence/8275-20260716-022546.jsondocs/bug-reproductions/evidence/8275-20260716-022546-before.jsondocs/bug-reproductions/evidence/8275-20260716-022546-after.jsondocs/bug-reproductions/evidence/8275-20260716-022546-batchrm.logNotes
8284/ agent notes in UI claim live Windows batch removal + witness panes passed on newer builds.How another agent should use this
%LOCALAPPDATA%\Programs\orca).--json, screenshots, logs) under a local folder; optionally comment results back here.cannot_repro/ needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: removecannot_repro, addhas_reprowhen conclusive.nwparker commentedon Aug 22, 2026
Likely fixed by #15755 — please re-test.
Batch worktree removal fanned out 32 concurrent PowerShell process-table probes; the daemon died under that and took unrelated split panes with it. Both halves are gone: the probe is a 16ms native snapshot (#15749) and teardown no longer probes at all — it terminates a job object it has held since spawn.
nwparker commentedon Aug 22, 2026
Not fixed — recording what has been ruled out, so this does not sit as "maybe already handled".
The recent Windows work (#15749, #15755, #15886) is all about terminating PTY trees exactly: job objects instead of a process-table scrape gating
taskkill /T /F. None of it explains a daemon that exits by itself during batch removal and takes unrelated split panes with it.One thing worth ruling in or out explicitly, since it is adjacent: #15755 assigns the daemon process to a Win32 job with
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, so the daemon now dies when the app that owns it dies. That is deliberate (it stops orphaned daemons surviving a crash), and it landed after this report, so it is not the cause here. It does mean that if the failure reproduces on a build newer than 1.4.185, "the app briefly lost the daemon" and "the daemon was reaped" become harder to tell apart from the outside — the daemon log is the thing to keep.The per-PTY job objects are scoped to individual panes and cannot reach the daemon or another pane's tree, so batch removal killing unrelated sessions is not that either.
If you get a reproduction, the useful artifact is the daemon log around the exit — specifically whether it recorded a shutdown reason or simply stopped.