fix(agentic): stabilize Task subagent execution - #1834
Merged
Conversation
- isolate coordinator futures behind Tokio task boundaries - align send_input and cancel permissions with the agent_id contract - propagate Tool cancellation through background subagent startup
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
send_inputandcancelpermission resources with the publicagent_idcontract.Type and Areas
Type:
Regression fix
Areas:
Rust core, Agentic TaskTool, subagent coordination
Motivation / Impact
This fixes three related Task subagent regressions:
thread 'tokio-rt-worker' has overflowed its stack.send_inputcould fail before execution withValidation error: session_id is required, even though the public tool contract suppliesagent_id.Subagent execution now has an independent Tokio stack boundary, permission validation follows the public identifier contract, and cancelled background starts do not remain as orphaned work.
Verification
pnpm run fmt:rscargo test -p bitfun-core --lib permission_intents_follow_the_agent_id_contract -j 1 -- --nocapturecargo test -p bitfun-core --lib background_subagent_start_honors_an_already_cancelled_tool -j 1 -- --nocapturecargo check -p bitfun-core -j 1git diff HEAD --checkReviewer Notes
The first cancellation-test invocation reached the command timeout while compiling; an identical rerun completed successfully. Only the existing
windows_appdead-code warning was emitted.A full workspace test and desktop steering E2E were not run. The focused tests cover the corrected permission contract and the already-cancelled background-start path.
Checklist