Repository navigation
Treat SIGHUP like SIGINT and SIGTERM - #25
Merged
Merged
Conversation
A closed terminal killed thirdshift on the spot, leaving the agent session running, the plugin temp dir behind, and no failure commit. SIGHUP now sets the interrupt flag, so the Run goes through the Failed run path and cleans up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 26, 2026
Closed
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.
Summary
A closed terminal now interrupts a Run the same way Ctrl-C does: the agent session is stopped, the Run goes through the Failed run path, and the plugin temp dir is removed.
Evidence
New test
sighup_while_the_session_runs_stops_it_and_fails_the_runuses the sharedassert_interrupt_fails_the_run. That assertion requires the Run to finish in under 20s, the Issue branch on origin to have thethirdshift: failed run (interrupted)commit withwip.txt, and the scenario'stmp/to be empty. Thetmp/check already runs for all three signals, viaassert_failed→assert_cleaned_up.panicked at tests/failed_run.rs:185:5: the session was not stopped(the fake agent ran its fullsleep 30)cargo test: all suites pass,failed_run9/9Merge Danger
Door: two-way
A revert restores the old behaviour.
Blast Radius: small
A Run whose terminal closes no longer dies immediately. It stops the agent session and pushes a failure commit, just as it does on SIGINT and SIGTERM.
Unaddressed findings
Standards
install()doc, and the array. I kept it that way: the spec asks for the module doc to name the handled signals, and a list of three changes rarely.Spec
Closes #24
🤖 Generated with Claude Code