Repository navigation
relay#552: the detached-host journey sweeps its runner on every exit, signals included - #555
Merged
barelyworkingcode merged 4 commits intoOct 21, 2026
Conversation
…every exit A cleanup stops every started session, ends the agent group and the runner processes by run-directory path, removes the directories and fails the result when any remain. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ignalled A SIGINT or SIGTERM cancels the journey, the sweep and teardown run, then the signal is delivered again so the process still ends. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…terministic signal handoff finish turns PASS, BLOCKED and NOTRUN into FAIL on a leftover or an unreadable process list; the signal goroutine is joined before the final drain; an ignored SIGINT stays ignored. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
merge-check: merged. approved, target, contract, evidence, owner, weakening |
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 #552
The
session-detached-hostjourney left its runner, the runner's two helpers and the run folder behind when devboxverify was killed mid-journey. A SIGTERM ended the process with no deferred cleanup. The runner leads its own process group and outlives its caller by design, so nothing else reaps it.The journey now:
relay session stop, the agent's process group, every process whose command line names the session's run folder, and the folder itself;Relay's own stop is still checked first on the PASS path; the sweep runs after it.
Proof, on a stack slot built from this branch (product code identical to the epic head):
runner.shand two helpers (parent pid 1) and the run folder. That matches the owner's report.--phase apiruns: main's harness passed 6, not-run 2; the branch harness passed 6, not-run 2 (twice, before and after review fixes).cleanup: pids [...] still name a started session's run directory. Source was restored byte for byte. My runs' leftovers were removed.The owner's own stray session from before this work was not touched.
Out of scope, theoretical: a session start that a signal cancels after relay accepted it, so its id never reached the journey.
Fix attempts: 2 (the second added the signal path once the cause was shown) plus one review round of fixes. Tokens: about 600k. Review rounds: 2.
Review: no blocking findings (default model, round 2; round 1 had one blocking finding, fixed: a leftover after BLOCKED now fails)
Red on main: epic-head harness at ba4cae1, SIGTERM to devboxverify mid-turn on stack r552 leaves runner.sh plus two helpers and the run folder
Real-app check: stack r552 (real relay app, loopback host): stray runner seen with the epic-head harness, none with the branch harness
Journey: session-detached-host PASS on the branch harness, --stack --phase api (pass=6 notrun=2)
Harness weakening: none; no check removed, no skip or not-run path widened, no timeout changed; a leftover process now fails a result that passed before
Main harness vs head: main's harness at ba4cae1 against the stack, --phase api: pass=6 fail=0 notrun=2
Break-and-restore: sweep call disabled -> journey FAIL "pids [...] still name a started session's run directory"; restored byte for byte (cmp)
🤖 Generated with Claude Code