Skip to content

[Bug]: Server session ledger omits tabs of newly created/re-adopted panes for 10+ minutes while they are open in the UI (SSH relay) #15484

Closed

Description

@chanmuzi

Operating system

Linux (relay/server side); macOS desktop client

Orca version

Server relay 0.1.0+a02497db1fab; desktop client version not captured (2026-08 build)

Details

Summary: ~/.orca/sessions/<namespace>.json on the SSH relay host does not reflect tabs that are open and visible in the UI when the pane was recently created or re-adopted. In our captures the tab stayed absent for 10+ minutes continuously, while long-lived tabs of other projects were present in the same file. Any logic keyed on this ledger (close tombstones, resurrection handling as discussed in #12447, or external tooling) sees stale state during that window.

Observed timeline (single incident, same host):

  1. 18:57:39 — user opens a project; the app creates a new PTY and auto-types claude --resume <id> into it. The tab is visible in the UI from this moment.
  2. 18:59 — the namespace ledger file is rewritten (mtime advances). tabsByWorktreePath for that worktree is an empty list; tabs of two other projects (long-lived panes) are present, and remoteSessionIdsByTabId lists only those two.
  3. 19:13 and 19:23 — two independent reads, 10 minutes apart, still show no tab for that worktree while the pane remains open in the UI.
  4. A second, independently created pane in the same project showed the same behavior in the same session (absent across two reads ≥10 minutes apart).

Why it matters: we learned this the hard way — we built a server-side cleanup that treated "pane held by the relay but no tab in the ledger" as "closed in the UI" (with a 10-minute double-check), and it terminated two sessions the user was actively looking at. If any part of Orca's own close/tombstone/resurrection logic consults this file with a similar assumption, it would misfire the same way, in both directions (resurrecting closed tabs, or treating open tabs as closed).

Expected: either the ledger is updated promptly (within seconds) when tabs are created/re-adopted, or the file's staleness semantics are documented so nothing treats tab absence as ground truth.

Environment: remote SSH workspace on a Linux host, Orca relay, Claude Code agent panes; no hibernation.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions