Repository navigation
Never kill a replacement Session from a stale Tool stop - #1286
Merged
Merged
Conversation
Deploying mouseterm with
|
| Latest commit: |
e2e4351
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5f16c1bf.mouseterm.pages.dev |
| Branch Preview URL: | https://audit-tool-reap-race.mouseterm.pages.dev |
dormouse-bot
approved these changes
Oct 21, 2026
nedtwigg
had a problem deploying
to
hosted-preview
October 21, 2026 08:28 — with
GitHub Actions
Error
…rupted Abandoning the kill after Ctrl+C restored nothing: the run had already exited, so it lapsed the host hold, turned the Tool into a plain terminal, and dropped the captured payload. Keep only the identity check, so a Session reusing the id mid-stop is never killed, and state in the spec that a stop is never abandoned once interrupted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
approved these changes
Oct 21, 2026
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.
A reap's stop writes Ctrl+C, waits for the prompt or a 3s grace, then kills the PTY. The "closed meanwhile" guard checked only
registry.has(id), so a Session that reused the id during that wait would be killed by the old stop. The guard now compares the registry entry captured before the interrupt.The stop is otherwise not cancellable, and
docs/specs/dor-tool.md-> Reaping now says so. Once Ctrl+C is written the run has usually exited. Abandoning the kill at that point restores nothing: it lapses the host hold, turns the Tool into a plain terminal, and drops the payload the stop captured. Finishing the stop leaves a Tool that rehydrates from that payload. A Tool shown during the stop already rehydrates once the stop resolves.Validation: the new test fails with the old guard and passes with the new one; all 992 tests in
lib/src/components/wall/pass;tsc -b, spec lint, and Markdown lint pass.🤖 Generated with Claude Code