Repository navigation
feat: kill a running bash call when a turn is stopped - #515
Merged
Merged
Conversation
A raised Cancel kills the command's process group through the same path as a timeout, and a token raised beforehand starts nothing. Refs: #26
ExecutionContext carries a Cancel that every spawn it hands out observes, and bash reports a killed command as ToolError::Cancelled. Refs: #26
run_turn_until raises a per-turn Cancel when the stop resolves while answering, waits for the running call to end, and starts none behind it. Refs: #26
A stop now waits for the call it stood on, so that call settles and is drawn like any other; the tracker that named it as finishing unseen had nothing left to say. The stop line and the tui help now say a running bash command is killed. Refs: #26
SECURITY.md claims only a spawned command can be interrupted, and says what the six in-process tools and a killed command leave behind. Refs: #26
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
tuistop now raises a per-turnCancelthat reacheskill_groupfor the runningbash, waits for the call to settle, and starts none behind it.#26 bash cancellation. The six in-process tools stay uncancellable, so #26 stays open for them.
SECURITY.mdis updated in this PR: "A running tool call cannot be interrupted" becomes "Only a spawned command can be interrupted", with the session-store bullet to match.Reviews:
/code-reviewat3c858bcreadorigin/main...HEAD(31 files, +577/−175) and its fixes landed in1ed2f6band70129b1;/security-reviewat70129b1readorigin/main...HEAD(31 files, +634/−175) and found nothing; the comment pass isba0519c(31 files, +632/−175 onorigin/main...HEAD), comment-only.