feat(subagents): state the delegation on its row, not the child's reply - #20
Merged
Conversation
A delegation's `⎿` row carried the child's entire answer. That text is
addressed to the MODEL — the parent reads it and writes its own reply — so
the row restated work the reader had not asked to see, at whatever length
the child felt like.
The original states the delegation itself:
⏺ Subagent(List the sources) (/agents to monitor)
⎿ Done (1 tool use · 27 tokens · 4s)
⏺ Subagent(Audit the tests) (/agents to monitor)
⎿ Backgrounded agent
The counts come from the child's own log, which the previous change
started reading, and only when the join is unambiguous: exactly one
delegation in flight and exactly one child settled under it. The harness's
own prompt tells a model to start independent delegations together, and
attributing one child's tokens to another's row would be worse than
reporting only the time this call took — which is always this call's own,
so a parallel delegation still gets `Done (4s)`.
The child's reply stays one ctrl+o away. The parent model read it; so can
the reader.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
A delegation's
⎿row carried the child's entire answer. That text is addressed to the model — the parent reads it and writes its own reply — so the row restated work the reader had not asked to see, at whatever length the child felt like.Claude Code renders
⎿ Done (2 tool uses · 48.0k tokens · 11s)for a foreground Task and⎿ Backgrounded agentfor a backgrounded one.Where the counts come from
The child's own session log, which #19 started reading — and only when the join is unambiguous: exactly one delegation in flight and exactly one child settled under it.
The harness's own prompt tells a model to "start independent delegations together in one assistant message", so attributing one child's tokens to another's row would be worse than reporting only the time this call took — which is always this call's own. A parallel delegation therefore still gets
Done (4s), with a test pinning that.The child's reply stays one ctrl+o away. The parent model read it; so can the reader.
Test
npm run typecheck,npm test— 150 files / 1938 passingnode scripts/verify-boundary.mjsscripts/tool-gallery.py subagent subagent_working subagent_background🤖 Generated with Claude Code