feat(task): subagents inherit the goal; the loop waits for them - #144
Merged
Conversation
filipeforattini
force-pushed
the
feat/goal-surfaces
branch
from
September 5, 2026 20:06
821c4a0 to
b203094
Compare
filipeforattini
force-pushed
the
feat/goal-subagents
branch
from
September 5, 2026 20:06
ab635fa to
1590060
Compare
filipeforattini
force-pushed
the
feat/goal-surfaces
branch
from
September 5, 2026 23:41
b203094 to
4ce18a0
Compare
filipeforattini
force-pushed
the
feat/goal-subagents
branch
2 times, most recently
from
September 5, 2026 23:58
2682b85 to
b203e9b
Compare
filipeforattini
force-pushed
the
feat/goal-surfaces
branch
2 times, most recently
from
September 6, 2026 00:36
c599e1f to
8d29864
Compare
filipeforattini
force-pushed
the
feat/goal-subagents
branch
from
September 6, 2026 00:38
b203e9b to
80691c7
Compare
…for it instead of spinning Children are blank by design, so the goal is copied, never shared: when the parent has an active goal, the task tool opens the child's prompt with a synthetic <goal> block carrying the objective and the contract. Not the turn budget, and not goal_complete — the child does one part, and only the parent's turn is judged. It is read fresh on every run, resumed tasks included, because the goal may have been dropped or changed since the child was created. The WAIT half was already in the loop: the judge sees the running background jobs and decide() parks the turn while one runs. What was missing was the proof — the new test launches a background subagent under a goal, holds its answer, checks the parent's turn parks with no turn spent and the child's first message carries the objective, then releases the child and watches its report re-enter the parent and the judge close the goal. Claude-Session: https://claude.ai/code/session_014XwJPDhq1ahcm3rd454WzQ
filipeforattini
force-pushed
the
feat/goal-subagents
branch
from
September 6, 2026 01:08
80691c7 to
e0e42b0
Compare
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.
Increment 2 of the
/goalplan, stacked on #143.taskopens the child's prompt with a synthetic<goal>block — objective and contract only. No budget, nogoal_complete(the child cannot call it anyway): the child does one part, the parent's turn is what gets judged. Read fresh on every run, so a dropped or paused goal stays home.decideparks the turn while one runs (landed in feat(session): /goal — a definition of done the harness pursues until it holds #142). This PR adds the round-trip proof: a background subagent under a goal → the parent's turn ends on WAIT with no turn spent → the child reports → its result re-enters the parent → the judge runs on that turn and closes the goal.experimentalBackgroundSubagentsis on in the prompt test layer (it defaults on in increment 3).Tests: goal 17, task 36, prompt 99 + the new round trip. One pre-existing test in
prompt.test.ts(leaves a turn alone while a tool is still running) sleeps 5 s and only passes underbun run test's--timeout 30000, which is what CI runs; untouched here.https://claude.ai/code/session_014XwJPDhq1ahcm3rd454WzQ
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.