[Bug]: Agent status goes to a dead tab after Orca restart — surviving shells keep the old ORCA_PANE_KEY, mobile hides Switch to chat view
Operating system
macOS
Orca version
1.4.215
Details
Short summary: A terminal that survives an Orca restart keeps the old ORCA_TAB_ID / ORCA_PANE_KEY in its shell environment, but the restored tab gets a new tab ID. Every agent started from that shell (including one started after the restart) reports hook status under the old pane key, so Orca files the status under a tab that no longer exists. On Orca mobile, the tab looks like a plain terminal and the long-press menu has no Switch to chat view.
What happened
- An Orca terminal tab ran Claude Code (started from its shell before the restart). Its process environment had
ORCA_TAB_ID=d873f622-…,ORCA_PANE_KEY=d873f622-…:909a6659-…. - Orca was quit and relaunched. The terminal and Claude kept running (the PTY survived).
- After the relaunch,
orca terminal listshowed the same PTY in a tab with a new ID (4fcd5a71-…, leafae74b5ec-…). orca worktree psandagent-hooks/last-status.jsonshowed Claude's hook reports (SessionStart, Stop) under the old pane keyd873f622-…:909a6659-…. The live tab had no agent status.- Orca mobile: long-press on that tab showed no Switch to chat view, while other Claude tabs had it.
- Exiting Claude and running
claude --resume <id>in the same tab did not help: the new Claude process inherited the old IDs from the tab's shell, and its SessionStart report again went to the old pane key. - Opening a new tab and resuming the same session there fixed it: the process got the new tab's IDs, and status showed on the new tab.
Expected
Hook reports from a terminal that survived a restart are attributed to the tab that now owns that PTY (for example by remapping the old pane key to the restored tab, or by keeping the tab ID stable across restart), so agent status, the sidebar and mobile native chat keep working without the user recreating the tab.
How to reproduce
- Open a terminal tab in a workspace and start
claudein it. - Quit and relaunch Orca while the agent keeps running.
- Compare the agent process's
ORCA_PANE_KEY(ps eww -p <pid>) with the tab's ID inorca terminal list --json. - Send a prompt, then check
orca worktree ps --json: the status row'spaneKeyuses the old tab ID, not the tab's current ID.
Anything else
- The timing is what points to the restart: the Claude process started on 27 Sep 22:34, Orca's main process on 28 Sep 17:27, and the tab ID differed afterwards. We did not see the re-keying itself in a log.
- We did not trace whether Orca's existing pane-key alias handling (
legacyPaneKeyAliasEntries) is meant to cover this case. - A related but separate cause of the same mobile symptom for Codex is #22873 (shared app-server daemon carries the first pane's env).
Source: stablyai/orca