Repository navigation
Conversation
Subagent children inherit full project instructions, so each one ran the repository-wide test and lint gates on its own, and the delegation guidance pushed test runs and small tasks into fresh children that re-read the same files. - Subagent tool description and the tool-discipline hint now steer short or context-dependent work inline and keep full suites with the parent. - Subagent-family child engines get a Role note: the delegating session owns repository-wide verification; run only focused checks. - panel-review captures the diff once and passes it to every reviewer instead of having each reviewer re-run git diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Child verification note honours a brief that explicitly asks for full gates. - Trim the Subagent description and tool-discipline hint additions. - Share one built-session capture helper between delegation tests. - panel-review states the no-re-run rule once and uses a <Step 1 diff> placeholder in each brief. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Subagent description and tool-discipline hint now state what delegation costs (fresh context, re-reads, only the final message comes back), default to doing a handful of tool calls or context-dependent work inline, advertise read-only investigation as the use case, and end with "when in doubt, don't spawn". mode:"read-write" stays documented factually but is no longer promoted as the way to implement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Subagents were a large share of wall-clock time. Two causes:
The guidance now follows a cost-first framing, closer to how other harnesses steer delegation: delegation has a real cost, read-only investigation is the advertised use, and the default is to do the work yourself.
Changes:
engine/agent/subagent.go):mode:"read-write"is still documented factually but no longer promoted.engine/prompt/builder.go): one sentence carries the same cost and default into the system prompt.internal/app/build.go): every Subagent-family child (task,task:*) gets a Role note. It says the delegating session owns repository-wide verification, so the child runs only focused checks. The exception is a delegating brief that explicitly asks for a full gate. Team members, Parallel branches, and internal reviewer and router children are unchanged.<Step 1 diff>. A diff over about 1000 lines is saved once and passed by path. Reviewers don't rungit diffthemselves.The agency text (
agencyDelta) and the panel-review reviewer count were reviewed and left unchanged.Tests
TestSubagentChildPromptScopesVerificationdrives a real Subagent call throughbuildIsolatedwith a scripted mock provider. It asserts the child's stable system prefix carries the note and the parent's does not. Mutation-checked: disabling the wiring makes it fail.TestDelegationGuidanceLandsInBuiltEnginePromptand the new test share one helper,captureBuiltPrefixes. Both assert through constants, not prose.go test ./engine/agent ./engine/promptpass.task docspasses.task lintis clean except for one darwin-only gosec finding inenvironment/microvm/launch_ownership_darwin.go, which this PR doesn't touch.go test ./internal/app: the delegation tests pass. Several tests fail locally on macOS (TestCanonicalConfiguredDir_AllowsMissingDefaultParents,TestYoloRelativeEscape*, and git-in-worktree end-to-end tests). They fail the same way on an unmodified checkout of the base commit.The effect on real sessions is not measured yet. This changes model-facing guidance, so the wall-clock win depends on model behaviour and needs a before/after run on a representative task.
API compatibility
🤖 Generated with Claude Code