Repository navigation
fix(coding-agent): propagate cancellation to child prompts - #144
Merged
Issacboy123 merged 3 commits intoAug 29, 2026
Merged
Issacboy123 merged 3 commits into
Issacboy123 merged 3 commits into
Conversation
Pepps233
force-pushed
the
fix/propagate-child-prompt-signal
branch
from
August 29, 2026 03:50
7052465 to
371f7b0
Compare
Pepps233
self-requested a review
August 29, 2026 03:50
Pepps233
approved these changes
Aug 29, 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.
Summary
Controller cancellation could reach an attached child before
agent_startwithout reaching the child's prompt preflight, leaving interruption or shutdown waiting indefinitely. This PR passes the controller run signal into the child prompt and coordinates cancellation across queued, startup-publication, and running states.Reasoning
Reusing the controller's existing run signal closes the startup gap without adding a second cancellation protocol. Serializing each run's cancellation prevents the prompt signal and session abort paths from aborting the same child twice during
agent_startpublication. Clearing only a rejected cancellation attempt permits later shutdown or navigation to retry after a transient failure.Changes
AgentSession.prompt()for the child run.Testing
node ../../node_modules/vitest/dist/cli.js --run test/suite/subagent-startup.test.ts test/suite/subagent-persistence.test.tsnode ../../node_modules/vitest/dist/cli.js --run test/suite/agent-session-prompt.test.ts test/suite/subagent-services.test.ts test/suite/subagent-registration.test.ts test/suite/subagent-coordination.test.ts test/suite/subagent-parent-messaging.test.ts test/subagent-controller.test.tsnpm run check