Repository navigation
relay#529: one Chief of Staff start path; closing a drop-in terminal hands the session back - #570
Merged
Merged
Conversation
…resumes the session at once Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t yet reviewed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…re durable Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
merge-check: merged. approved, target, contract, evidence, owner, weakening |
Owner
Author
|
Merged by merge-check into epic/525-session-adoption: approved, target, contract, evidence, owner, weakening PASS; ci and verified NA. |
This was referenced Oct 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #529
One Chief of Staff start path, and closing a drop-in terminal hands the session back headless at once. The tmux
respawn-paneswap is split into relay#543 (after relay#536).What changed
mode: "terminal"request runs the same start and answersmode: "headless".terminal_on_host,terminal_needs_claudeand the entry/terminal refusals are gone. Any other mode is still 400mode_invalid.cmd/relay/session_swap.golinks a drop-in terminal to its held session. When the terminal has ended and the session reads dormant, relay resumes it on the drop-in caller's behalf (resumeSession, the existing path). Local runner sessions and host sessions both start a new generation.session_swapintent row before it acts and a durable completion row after. With auditing off, drop-in answers 503audit_unavailableand stops nothing.session.hand_back, with a stable resume code asreasonon refusal.Harness change (reported as a gate change)
cos-start(screen phase, nightly) terminal leg now assertsmode: terminalanswers 201mode: headless, a session row and no terminal row. The terminal argv check and terminal cleanup are gone: the behaviour they checked was removed by the contract (decision 1). New api-phase journeysession-swap-backon the local model endpoint.Notes from review (round 1: no blocking findings)
TestSwapRefusedWhenAuditOff's CLI leg checks only a non-zero exit; the HTTP leg asserts 503audit_unavailableexactly.casein the CoS start's kindswitchreads awkwardly.docs/FEATURES.mdrow TM3a.3 is edited because threat-model 3a changed (contract: "3a and its promise row").startHandBack; a hand back under a credential revoked while the terminal was open; a slow-host transport error resuming while the terminal may run.Proof
ok relaye2e/features 235.194s,-race -parallel 32); contractTestSessionsDropIn|TestChiefOfStaffStartEntrygreen on relay and fakerelay.r529, api phase, at 5a49db9: pass=8 fail=0 notrun=2;session-swap-backandsession-detached-hostPASS, local model endpoint only.relay drop-inin a real Terminal window opened the same conversation; a send while held answereddropped_in;/exitgavesession.hand_backok; the next message was answered with no Resume; foursession_swaprows (pending, ok per direction).idinstead ofterminalId; caught by the stack run). Review rounds: one. Tokens: about 1.4M across agents.Review: no blocking findings (round 1, default model)
Journey: session-swap-back PASS on stack r529 at 5a49db9 (api phase, local model endpoint)
Real-app check: stack r529 bundle at 5a49db9: relay drop-in in a real Terminal, send while held dropped_in, /exit handed back (session.hand_back ok), next message answered, four session_swap rows
Harness weakening: no loosening of a kept claim; cos-start terminal leg asserts the new contract (decision 1); new journey session-swap-back
Main harness vs head: epic-branch harness against head 5a49db9 on stack r529, api phase: pass=7 fail=0 blocked=0 notrun=2
Break-and-restore: swapTable.exited made to never report both halves: e2e TestSwapBackResumesAtOnce red and journey session-swap-back FAIL (no session.hand_back); restored byte for byte (sha matches)
Weakening reviewed: TestTerminalList, TestDropInHandsOver, TestChiefOfStaffStart, TestCosStartEntryRefusals, TestChiefOfStaffStartRows/hosted changed assertions only where contract decisions 1, 2 and 7 removed the claim; reviewer confirmed each
🤖 Generated with Claude Code