feat(agent): continue completed subagent tasks - #580
Open
changer-changer wants to merge 1 commit into
Open
changer-changer wants to merge 1 commit into
changer-changer wants to merge 1 commit into
Conversation
This was referenced Sep 13, 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.
Following up on a subagent currently starts a new child without its earlier tool history. This adds an optional
task_idargument to theagenttool so a completed child can continue with a new instruction, including after the owning parent session is reloaded.The native runtime restores the child's durable messages, keeps its identity and last-used provider/model, and applies the parent's current permissions. Sidechain transcripts now record terminal results and compaction boundaries, with sequence state restored before appending another round. The tool returns the resumable id in its text and JSON result.
Unknown, foreign, busy, corrupt, incomplete and failed tasks return explicit errors. A removed model also fails rather than silently switching. Custom fork hosts must opt in to continuation support, so older hosts cannot accidentally interpret
task_idas a fresh task. See the continuation contract for supported boundaries and examples of failure cases.Validation:
networkFetchtests also observed on the baseline; those files are unchanged.main; shared fork-path conflicts will need resolving if feat(agent): configure subagent roles and model bindings #576 merges first.This is the continuation part of the subagent work, submitted separately for review. The gateway probes use scripted model responses; no model-quality or speed improvement is claimed from them.
Merge sequencing (added 2026-09-14)
This PR is one of four coordinated subagent-lifecycle PRs (#579, #576, #580, #581). The features are semantically independent but overlap textually in the agent core, so an explicit merge order is proposed in #583.
Proposed order: #579 → #576 → #580 → #581 (this PR: 3).
This branch's known conflicts: clean against current
main; 4 core files with #576, 1 file with #581 (agent.ts). Already validated merged together with #581 on the integration branch referenced in the tracking issue.After each sibling PR merges, I will rebase the remaining branches onto
mainand re-run the targeted test suites before updating the PRs.