fix: keep foreign discovery from throwing, and correct the adoption docs (release review)

candidatesFrom had moved outside the try when the transports moved to
runForeignProbe, so a classifier failure would have reached the route as a 500.
The module promises it never throws, so the guard is back for local and docker.

Docs:
- The api reference said `blocked` waits are always refused, and listed Ralph as
  refused while two of its file routes were not (they are now).
- The invariants doc and CLAUDE.md gain the rules this review turned up: target
  syntax in names, the ping before list-panes, nothing typed into an adopted pane,
  quoteAdoptLaunch.
- CLAUDE.md no longer says every claude session gets hooks or a stop wait.
- ForeignTmuxSession's mode and workingDir describe the first listed pane, not
  the active one.
- The wiki had no page on adoption: The Dashboard gains an Opened outside Codeman
  section, and the remote and docker pages point at it. docs/docker-cases.md now
  separates an adopted container from an adopted tmux session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-06 04:45:29 +01:00
1 parent 25214fcc5f
commit 2d7cd49449
11 files changed
+104 -30

No files matched your search

+6 -2
View File
@@ -79,11 +79,15 @@ export interface ForeignTmuxSession {
attached: boolean;
/** Epoch MILLISECONDS (tmux reports seconds; normalized on parse). */
createdAt: number;
/** What the active pane is running, from the bounded process-tree walk. */
/**
* What the session's FIRST LISTED pane is running, from the bounded process-tree
* walk. Not the active window: claude in window 1 of a session whose window 0 holds
* a shell reads as `shell`. The tab lands on that same first window, so the two agree.
*/
mode: SessionMode;
/** Truncated command line behind the classification, for the UI subtitle. */
command: string;
/** The active pane's cwd. Informational — an adopted pane is never `cd`'d. */
/** That same pane's cwd. Informational: an adopted pane is never `cd`'d. */
workingDir: string;
/** Codeman session id already wrapping this target, when one exists. */
adoptedBy?: string;