Repository navigation
relay#527: adopt an idle outside Claude session - #547
Conversation
… events Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…feat/527-claude-adopter
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rom comments Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tail is partial Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e tail Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e outside claude Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mpt shows No, exit Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hild Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n helper never vetoes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…feat/527-claude-adopter # Conflicts: # docs/FEATURES.md # docs/THREAT-MODEL.md
…wo theoretical entries Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… key per 1.5 s Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Evidence at head 258c4f4 (epic head merged in at 4230c98; review round 4, owner-approved, covered everything since 08fa14f through f6eeed4; 258c4f4 changes only the journey's trust-prompt key loop). Suite: Review: round 4 (owner-approved) approve, no blocking findings; its two minors fixed in f6eeed4 |
|
Weakening reviewed: TestOutsideLiveRowHasNoClaudeSessionID and TestOutsideResumedSessionShowsOnceWithoutClaudeSessionID are replaced by TestOutsideLiveRowCarriesClaudeSessionID and TestOutsideResumedSessionShowsOnceWithClaudeSessionID, because contract decision 2 puts claudeSessionId on live rows; the session-adopt NOTRUN result is the contract's answer for a stack with no local model endpoint. |
|
merge-check: merged. approved, target, contract, evidence |
|
Merged by merge-check: approved, target, contract, evidence PASS; ci and verified NA (epic child); owner and weakening reported in the run report. |
Closes #527
Adopt an idle Claude session started in a terminal on this Mac:
POST /api/sessions/adopt(execute class, socket only, out of the chief-of-staff scope) ends the process and resumes the same conversation as a relay headless session in the same folder, under the project's sandbox and policy. Outside rows carryclaudeSessionId,adoptableandadoptReason; no pid or start time leaves relay.Contract: the issue's
## Contractplus amendments 1 to 4 (issue comments).Non-obvious decisions
status, and vetoes on an open tool call, a stale status, or a child started after the first assistant record written after the process start. A child whose kernel executable path is/usr/bin/caffeinatenever vetoes: Claude Code starts it at each turn and it lives 5 minutes. Found by the journey against a real terminal Claude, which the door refused asbusybefore the fix.CLAUDE_CODE_ENTRYPOINT/CLAUDECODE: run from inside an agent session, claude registers assdk-cli, which the door correctly refuses.Minor findings, not fixed (review rounds 2 and 3)
child_process, not a scan-specific reason. Fails closed; interrupt gets past it.ctxwhile it reads a long transcript.busy, not which veto caused it.docs/THEORETICAL.md.Effort
Fix attempts: review round 1 (coverage gate, long-transcript veto), round 2 (test restamp), real-app (caffeinate false-busy, two attempts: ps comm, then kernel path). Journey environment fixes: three. Tokens: about 3.5M across agents.
Found while working
relay#541, relay#542 (ideas), relay#544 (flake), relay#545 (suite passes go test's 10-minute default), relay#546 (e2e leaves a tmux server on the default socket).
Evidence
Suite:
(cd e2e && go test -race -count=1 -parallel 32 ./features/)at a8222ab:ok relaye2e/features 196.699s. At a262561, two runs each failed one test of flake relay#544 only (outside-session WebSocket frame read), which also fails on the epic head; its root-cause pass is open.Journey run:
devboxverify --stack(api phase) on stack r527 built from a262561:SUMMARY pass=7 fail=0 blocked=0 notrun=2;session-adopt PASS: idle terminal Claude adopted by conversation id: 201, terminal process gone, the resumed headless session replied in the same transcript, session_adopt intent and ok completion audited.Journey: session-adopt PASS on stack r527 at a262561 (real terminal Claude on the stack's local model endpoint)
Break-and-restore: dropped the procStart comparison in AdoptReason; TestAdoptStartMismatchNeverAdopted red at g1_outside_adopt_test.go:794 (row adoptable:true); restored byte for byte (cmp against HEAD). Removed the forward scan; TestAdoptChildVetoInLongTranscript red at :710 (201, want 409 busy); restored.
Harness weakening: none (journey added; no journey, assertion, timeout or skip removed or loosened)
🤖 Generated with Claude Code