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
{{ message }}
Repository navigation
[Bug]: Sessions appear to being killed at random over the remote Orca link. #9952
Sessions seem to be being killed apparently at random, even when focussed in the desktop app (using the Orca remote functionality into a dev box ) - sessions literally vanish whilst typing.
Retrieval is sometimes possible by using the Agent Session History tab (but sometimes not).
I'm unable to reproduce this reliably, but it's happening about once every 30 minutes.
Reproduction environment available — with host-side evidence
Re: the env_blocked status — I have the multi-machine remote runtime setup this needs, and I hit this daily. Below is hard evidence from the host's daemon.log that should narrow the search considerably.
Environment
Orca
1.4.180 (both ends)
Client
macOS (MacBook)
Host
macOS (Mac mini), GUI app — not headless orca serve
Link
Reproduces on both SSH relay and Remote Orca Server (runtime ws)
Signature: mass session-exited with code: 0, zero session-killed
daemon.log contains 13 distinct clusters (3+ session-exited inside the same second) between 2026-08-07 and 2026-08-13. Most recent:
2026-08-13T00:27:35Z session-exited × 15
Those 15 sessions span 5 unrelated workspaces (names redacted). Full event breakdown for the surrounding 60s window:
This separates the issue from #8459. That incident's signature was 28 session-killed events with immediate:true. Here there are zero session-killed — the shells exited cleanly on their own, and nothing in the daemon logged a decision to end them.
From the UI side this matches the original report precisely: the tabs do not enter a "reconnecting" state, they are simply gone.
Ruled out, with evidence
Hypothesis
Evidence
Verdict
App or daemon crash
Orca main process and daemon process both had 1d 3h+ uptime spanning the 08-13 incident; PIDs unchanged. No crash reports.
Entire log holds only login-session-watch-armed x5 and login-session-watch-disabled x1. No login-session-probe-rejected, no retire event. It never fired.
ruled out
System sleep
pmset -g log: Sleep/Wake count 0 since boot (2026-08-11)
ruled out
Transport / relay defect
Reproduces identically on SSH relay and on Remote Orca Server
Every PTY is thus a child of login(1) and bound to a macOS login/audit session. If that session is torn down, every PTY on the host exits simultaneously and cleanly with no daemon involvement — precisely the observed signature, and transport-independent by construction.
It also explains something I can confirm from this host: purely local terminals die in the same event, not just remote ones.
Stated plainly as a hypothesis — I have not yet captured a direct correlation between one teardown and a specific system event. Supporting evidence that this wrapper is fragile: #12971 (login(1) wrapper no longer isolates terminal children on macOS 26) and #13764 (wrapper leaks PTYs, session-closed never fires).
One environmental note that may be the trigger: this host is driven over Screen Sharing, which reconnects frequently here — each connection spawns a fresh screensharingd. A GUI/audit session change is my prime suspect.
Offer
Since the blocker here is environment rather than analysis, I am glad to run instrumentation against the real setup — extra logging on the PTY teardown path, an ORCA_DISABLE_MACOS_LOGIN_SHELL=1 A/B, or whatever else would be most useful. Just say what to measure.
Repro (Orca 1.4.211, host = Linux/CachyOS KDE Wayland, client = macOS, paired over runtime websocket)
On the Linux host, open a worktree and start Claude Code in a terminal tab. Then leave the host window on another worktree/tab (or minimized) for >30 s. terminalHiddenViewParking is at its default (on).
From the macOS client, open that terminal tab and send a prompt.
Each new turn (user prompt or orchestration-injected input) makes the client's terminal disconnect/reconnect. On the host, daemon.log logs session-attached for the same session (same pid, no exit). main.trace.ndjson logs persistence.pty-bindingorigin=reattach host=local misses=not_durable, ~0.3 s after the prompt timestamp.
In one day: 79 attaches, 75 within ±5 s of a turn start. Worker tabs that nobody views remotely show none.
The same hidden tab with no remote viewer does not reattach on input, OSC title changes, or Claude turns (checked with a scratch terminal).
Suspected chain: a turn-start status/title publish makes the paired client remount or resubscribe the mirrored tab. Then session.tabs.activate runs, finds the host surface not ready (hidden tab cold-parked on the host renderer), and re-materializes it via createRuntimeOwnedMobileSessionTerminal → adoptStablePane → daemon createOrAttach. One concrete suspect: buildMirroredTerminalTabs doesn't carry generation, so any client-side generation bump is reverted by the next host snapshot and changes the pane key. Cold-park eligibility also doesn't consider an active remote viewer. The same setup with a macOS host never showed this, likely because the host tab was visible there.
Workaround confirmed: keeping the terminal tab visible in the host window (so it is never cold-parked) stopped it completely — zero session-attached/reattach events across the following remote prompts, versus one per turn before. That points at hidden-view parking on the host combined with an active remote viewer. Setting terminalHiddenViewParking: false should be the durable workaround; it has no settings UI and the runtime settings.update RPC does not accept it, so it can only be changed in orca-data.json while Orca is not running.
Happy to collect client-side remote_terminal_stream_* breadcrumbs if useful.
Activity
AmethystLiang commentedon Jul 22, 2026
Related Remote Orca Server issues (session/terminal lifecycle)
pty-exitcan kill live host terminal sessionsRelated open PRs
nwparker commentedon Jul 27, 2026
Reproduction status: env_blocked (remote Orca server session kills)
Intermittent remote session kills over remote Orca server require multi-machine remote runtime not available in this pass.
Not labeling
cannot_repro.free4416 commentedon Aug 13, 2026
Reproduction environment available — with host-side evidence
Re: the
env_blockedstatus — I have the multi-machine remote runtime setup this needs, and I hit this daily. Below is hard evidence from the host'sdaemon.logthat should narrow the search considerably.Environment
orca serveSignature: mass
session-exitedwithcode: 0, zerosession-killeddaemon.logcontains 13 distinct clusters (3+session-exitedinside the same second) between 2026-08-07 and 2026-08-13. Most recent:Those 15 sessions span 5 unrelated workspaces (names redacted). Full event breakdown for the surrounding 60s window:
Cluster history (UTC, count):
This separates the issue from #8459. That incident's signature was 28
session-killedevents withimmediate:true. Here there are zerosession-killed— the shells exited cleanly on their own, and nothing in the daemon logged a decision to end them.From the UI side this matches the original report precisely: the tabs do not enter a "reconnecting" state, they are simply gone.
Ruled out, with evidence
isIdle()returns false wheneverlistSessions().length > 0(daemon-server.ts:530-542)login-session-watch-armedx5 andlogin-session-watch-disabledx1. Nologin-session-probe-rejected, no retire event. It never fired.pmset -g log: Sleep/Wake count 0 since boot (2026-08-11)The cause therefore sits outside the daemon's own lifecycle logic, outside the transport, and outside sleep.
Hypothesis: all PTYs share one macOS login session
PTYs on this host spawn wrapped, per
daemon.log:Every PTY is thus a child of
login(1)and bound to a macOS login/audit session. If that session is torn down, every PTY on the host exits simultaneously and cleanly with no daemon involvement — precisely the observed signature, and transport-independent by construction.It also explains something I can confirm from this host: purely local terminals die in the same event, not just remote ones.
Stated plainly as a hypothesis — I have not yet captured a direct correlation between one teardown and a specific system event. Supporting evidence that this wrapper is fragile: #12971 (login(1) wrapper no longer isolates terminal children on macOS 26) and #13764 (wrapper leaks PTYs,
session-closednever fires).One environmental note that may be the trigger: this host is driven over Screen Sharing, which reconnects frequently here — each connection spawns a fresh
screensharingd. A GUI/audit session change is my prime suspect.Offer
Since the blocker here is environment rather than analysis, I am glad to run instrumentation against the real setup — extra logging on the PTY teardown path, an
ORCA_DISABLE_MACOS_LOGIN_SHELL=1A/B, or whatever else would be most useful. Just say what to measure.euisan commentedon Sep 27, 2026
Repro (Orca 1.4.211, host = Linux/CachyOS KDE Wayland, client = macOS, paired over runtime websocket)
terminalHiddenViewParkingis at its default (on).daemon.loglogssession-attachedfor the same session (same pid, no exit).main.trace.ndjsonlogspersistence.pty-bindingorigin=reattach host=local misses=not_durable, ~0.3 s after the prompt timestamp.In one day: 79 attaches, 75 within ±5 s of a turn start. Worker tabs that nobody views remotely show none.
Suspected chain: a turn-start status/title publish makes the paired client remount or resubscribe the mirrored tab. Then
session.tabs.activateruns, finds the host surface notready(hidden tab cold-parked on the host renderer), and re-materializes it viacreateRuntimeOwnedMobileSessionTerminal→adoptStablePane→ daemoncreateOrAttach. One concrete suspect:buildMirroredTerminalTabsdoesn't carrygeneration, so any client-side generation bump is reverted by the next host snapshot and changes the pane key. Cold-park eligibility also doesn't consider an active remote viewer. The same setup with a macOS host never showed this, likely because the host tab was visible there.Workaround confirmed: keeping the terminal tab visible in the host window (so it is never cold-parked) stopped it completely — zero
session-attached/reattachevents across the following remote prompts, versus one per turn before. That points at hidden-view parking on the host combined with an active remote viewer. SettingterminalHiddenViewParking: falseshould be the durable workaround; it has no settings UI and the runtimesettings.updateRPC does not accept it, so it can only be changed inorca-data.jsonwhile Orca is not running.Happy to collect client-side
remote_terminal_stream_*breadcrumbs if useful.