You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: daemon-host 1.4.146 Platform: Windows 11 client + Windows 11 remote host Setup: Remote environment over Tailscale WebSocket (client machine connects to a remote Orca runtime on another machine).
Symptom
Terminal tabs showing Session "<worktreeId>::<path>@@<hash>" was explicitly killed persist in the workspace, reappear on reconnect, and cannot be removed by closing the tab. They accumulate over time (started with ~40; new ones keep appearing).
Root cause (observed)
The workspace session is persisted keyed by the stable environment id (workspaceSessionsByHostId["runtime:<envId>"]), but individual tabs bind to pty handles (<worktreeId>@@<hash>, serve-<uuid>).
Each time the remote runtime restarts, a new runtimeId is issued (observed across a single debugging session: c4cf3d77… → 9072f8c6…, etc.). The prior runtime's ptys are marked "explicitly killed".
Orca does not prune the tab/pane bindings whose backing pty was killed, and the terminal daemon (orca-terminal-daemon.exe) retains the dead pty sessions in memory.
Result: unclosable "explicitly killed" ghost tabs that come back on every reconnect.
Evidence
The ghost pty ids are not present in either machine's orca-data.json (full recursive search = 0 hits on both client and host) → they live only in daemon memory / runtime state, not persisted config.
Closing the tab does not clear it; it reappears after reconnect.
Restarting orca-terminal-daemon.exe on the host purges all of them at once (but kills all live terminals, and they recur on the next host runtime restart).
The runtimeId changes on every host runtime restart.
Repro
Set up a remote environment; open terminals in it from the client.
Reconnect → prior ptys are "explicitly killed"; their tabs remain as ghosts.
Repeat → ghosts accumulate. Closing tabs does not remove them.
Expected
On reconnect / runtime restart, prune tabs whose backing pty is dead (or transparently re-establish them), and evict dead pty sessions from the daemon — instead of leaving unclosable "explicitly killed" ghost tabs.
Workaround
Restart the terminal daemon on the host (kills all live terminals). Recurs on the next host runtime restart.
Still reproduces on 1.4.167, and not only with a Windows remote host — the same symptom appears with a Linux (WSL2) remote runtime.
Environment
Client: Orca desktop 1.4.167 (Windows)
Coordinator: macOS host running orca serve1.4.167
Remote runtime: orca-ide serve1.4.167 on WSL2 Ubuntu, run as a systemd user service, reached over Tailscale WebSocket
Observed
The sidebar lists 31 agents, all Done, all stamped with the same relative time — the moment the remote runtime was restarted. Meanwhile the runtime is idle:
orca worktree ps --environment <env> -> live:0 pty:no
orca terminal list --environment <env> -> 0 terminals
remote host -> no agent processes, load average 0.00
So these are purely stale list entries, not live PTYs. The CLI and the sidebar disagree: terminal list says 0, the sidebar says 31.
Where the entries actually persist
On the remote runtime, in ~/.config/orca/profiles/local-default/orca-data.json:
workspaceSession
tabsByWorktree dict{1}
terminalLayoutsByTabId dict{33} <-- stale
terminalPtyIncarnationsByPaneKey dict{33} <-- stale
workspaceSessionsByHostId dict{0} <-- empty
Worth noting against the root-cause analysis in the description: workspaceSessionsByHostId is empty on this host. The stale tab state lives under the singular workspaceSession instead.
terminal-history is a derived artifact, not the source
~/.config/orca/terminal-history/ held 33 directories named <worktreeId>::<path>@@<hash>, 59 MB total. Deleting all of them while the runtime was running:
directory count dropped to 0 (verified)
it returned to 33 within minutes, now 400 KB — scrollback gone, directory structure restored
The directories are regenerated from the two workspaceSession maps above, so clearing history on disk does not clear the sidebar.
Restarting the runtime does not help
systemctl --user restart on the remote runtime leaves all 33 entries in place, matching the "reappear on reconnect" behaviour in the report. No CLI command or UI control removes them (see also #10718 for the missing dismiss affordance).
Cross-referencing: PR #21277 improves the dismissal of orphaned tabs when a host runtime or worktree restarts/tears down. When closing a tab whose underlying worktree selector is gone, the host resolves idempotently with selector_not_found and the renderer lifecycle locks the close intent into durable state, allowing orphaned tabs on deleted or restarted worktrees to be dismissed without entering an infinite flicker/resurrection loop.
Fixed by #17945 (shipped in v1.4.197), which stops reconnects and rotations from holding on to tabs whose sessions are gone, plus #16752. Closing. If killed-session ghost tabs still pile up on a current build, please reopen with your Orca version.
Activity
nwparker commentedon Jul 27, 2026
Reproduction status: env_blocked (remote env ghost terminals)
Explicitly-killed ghost tabs after remote runtime restart need Windows remote env + Tailscale WebSocket host restarts.
Not labeling
cannot_repro.Karnian commentedon Aug 4, 2026
Still reproduces on 1.4.167, and not only with a Windows remote host — the same symptom appears with a Linux (WSL2) remote runtime.
Environment
orca serve1.4.167orca-ide serve1.4.167 on WSL2 Ubuntu, run as a systemd user service, reached over Tailscale WebSocketObserved
The sidebar lists 31 agents, all
Done, all stamped with the same relative time — the moment the remote runtime was restarted. Meanwhile the runtime is idle:So these are purely stale list entries, not live PTYs. The CLI and the sidebar disagree:
terminal listsays 0, the sidebar says 31.Where the entries actually persist
On the remote runtime, in
~/.config/orca/profiles/local-default/orca-data.json:Worth noting against the root-cause analysis in the description:
workspaceSessionsByHostIdis empty on this host. The stale tab state lives under the singularworkspaceSessioninstead.terminal-historyis a derived artifact, not the source~/.config/orca/terminal-history/held 33 directories named<worktreeId>::<path>@@<hash>, 59 MB total. Deleting all of them while the runtime was running:The directories are regenerated from the two
workspaceSessionmaps above, so clearing history on disk does not clear the sidebar.Restarting the runtime does not help
systemctl --user restarton the remote runtime leaves all 33 entries in place, matching the "reappear on reconnect" behaviour in the report. No CLI command or UI control removes them (see also #10718 for the missing dismiss affordance).fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect (
fix(terminal): a close the host never heard must survive the reconnect (
fix(remote): stop absence and rotation from latching terminal UI state (
feat(serve-stats): surface runtime id, browser pages and unverifiable…
LesleyMurfin commentedon Sep 17, 2026
Cross-referencing: PR #21277 improves the dismissal of orphaned tabs when a host runtime or worktree restarts/tears down. When closing a tab whose underlying worktree selector is gone, the host resolves idempotently with
selector_not_foundand the renderer lifecycle locks the close intent into durable state, allowing orphaned tabs on deleted or restarted worktrees to be dismissed without entering an infinite flicker/resurrection loop.fix(terminal): a close the host never heard must survive the reconnect (
fix(remote): stop absence and rotation from latching terminal UI state (
nwparker commentedon Oct 26, 2026
Fixed by #17945 (shipped in v1.4.197), which stops reconnects and rotations from holding on to tabs whose sessions are gone, plus #16752. Closing. If killed-session ghost tabs still pile up on a current build, please reopen with your Orca version.