Correct the claim that reattach is local only
Written down as "an ssh session's child dies with its connection, so it takes the ordinary --resume path". The code never had that branch: `start` records a pid whatever the transport, and for a remote session the process the backend owns is the ssh client. Adopting it is right -- the fifo feeds it, its logs capture the far end, and ssh lives exactly as long as the remote command, so its liveness is the session's. The docs claimed less than the code does, which is the safe direction to be wrong in but still wrong, and it was about to mislead someone: a remote `claude` has an sshd pipe on stdin under every version of this server, because the fifo is on the backend's side of the connection. Reading a remote session's stdin therefore says nothing about which backend started it, and we were an inch from concluding otherwise. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VETa8afmpWaYezLCqJhDB8
This commit is contained in:
1 parent
4cbd567c35
commit
184b6fc6a6
2 files changed
+18
-5
No files matched your search
@@ -281,8 +281,13 @@ day:
|
||||
- **`--resume` only ever runs when nothing is running.** That check is the
|
||||
fix for the incident below, and the reason there is one entry point
|
||||
(`ClaudeDriver::launch`) rather than a spawn and an attach.
|
||||
- Local only: an ssh session's child dies with its connection, so it takes
|
||||
the ordinary `--resume` path.
|
||||
- Remote sessions are adopted too. The pid recorded for one is the **`ssh`
|
||||
client's**, on this machine — that is the process the backend owns, and it
|
||||
lives as long as the remote command does. (This said "local only" until
|
||||
2026-08-29; the code never had that branch.) Note the far `claude` always
|
||||
has an sshd pipe on stdin whichever version started it, since the fifo is
|
||||
on the backend's side — so you cannot tell a backend's version by looking
|
||||
at a remote session's stdin.
|
||||
|
||||
The import list reports each session's **size as well as its line count**,
|
||||
because the two disagree in the way that matters: these transcripts embed
|
||||
|
||||
Reference in new issue
Block a user