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
A paired viewer connects through an Orca relay to an Azure buildbox runtime.
Symptoms
The viewer showed nine terminal tabs while the host's authoritative runtime inventory contained seven connected, writable PTYs. The two extra viewer records were blank and could not be closed from the UI.
The extra records had no PTY or incarnation (ptyId: null, incarnationId: null), were disconnected, and belonged to an old client topology revision. The host had already advanced several revisions and no longer published either tab.
Root cause
Two renderer paths combine to make these ghosts persistent:
shouldReplaceTerminalTab deliberately retains local null-PTY tabs unless an exact structured-create handoff identifies them. There is no age bound, so a restored placeholder omitted by every later authoritative host snapshot survives indefinitely.
closeTerminalTab resolves the worktree catalog route before consulting the terminal's environment-scoped remote:<environment>@@<handle> PTY identity. During catalog hydration gaps it cancels an otherwise routable host close, which makes affected remote tabs appear unclosable.
In the observed state, locally pruning the two stale records did not kill any Azure PTY (ptyKilled: false), and the Azure inventory remained at seven live terminals.
Expected behavior
Give newly created null-PTY placeholders a bounded grace period, then prune them when an authoritative host snapshot still omits them.
Route explicit closes from unambiguous environment-scoped PTY evidence when the worktree catalog is temporarily absent.
Keep genuinely in-flight structured creates during the grace period, and use PTY evidence only when it identifies exactly one owner.
Related: #9585 tracks dead remote terminal tabs accumulating after runtime restarts. #11495 tracks paired-viewer attachment loss for host PTYs that remain live.
Cross-referencing: PR #21277 adds idempotent selector_not_found handling on host close RPCs and expands the client lifecycle recovery for absent worktrees/selectors. This allows unclosable ghost tabs associated with missing worktree catalogs or dropped selectors to be dismissed cleanly on the client without triggering an unhandled rejection or immediate resurrection.
Status: #27132 fixes the routing part. A close now routes by the host the tab's own PTY id names and is never a silent no-op. Still open: retiring the null-PTY ghost rows the host closed (this needs the host to publish its close records to clients).
Activity
LesleyMurfin commentedon Sep 17, 2026
Cross-referencing: PR #21277 adds idempotent
selector_not_foundhandling on host close RPCs and expands the client lifecycle recovery for absent worktrees/selectors. This allows unclosable ghost tabs associated with missing worktree catalogs or dropped selectors to be dismissed cleanly on the client without triggering an unhandled rejection or immediate resurrection.OrcaWin commentedon Oct 10, 2026
Status: #27132 fixes the routing part. A close now routes by the host the tab's own PTY id names and is never a silent no-op. Still open: retiring the null-PTY ghost rows the host closed (this needs the host to publish its close records to clients).