Repository navigation
fix(claude): 🐛 show the effort a subagent actually runs at - #13333
Closed
DiegoJohnsonL wants to merge 1 commit into
Closed
DiegoJohnsonL wants to merge 1 commit into
DiegoJohnsonL wants to merge 1 commit into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that corrects subagent effort labels using SDK hook data without changing execution, permissions, defaults, schemas, or workflows. A focused adapter test covers the refinement from the seeded effort to the reported effort. You can add or adjust custom eligibility rules. Learn more. |
DiegoJohnsonL
force-pushed
the
fix/claude-subagent-effort-label
branch
from
September 24, 2026 01:11
1c4d1c1 to
e066bb0
Compare
A subagent whose agent definition sets its own effort was labeled with the thread's effort. task_started carries no effort, so the adapter seeded the label from the session selection and never corrected it. The SDK reports a subagent's applied effort only on hooks fired inside it. Register PreToolUse and SubagentStop hooks and refine the task's effort from them, the way assistant snapshots already refine its model. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
DiegoJohnsonL
force-pushed
the
fix/claude-subagent-effort-label
branch
from
September 24, 2026 01:19
e066bb0 to
347e092
Compare
2 tasks done
2 tasks done
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.
Why
A Claude subagent whose agent definition sets its own
effortis labeled with the thread's effort instead. From a thread at Extra High, aproberagent defined witheffort: lowshowsopus-5-5 · xhighin the Agents panel, while its transcript records"effort":"low"on every turn.task_startedcarries no effort, so the Claude adapter seeds the label from the Agent tool'seffortinput or the session's effort. Subagent assistant snapshots later correct the model part of the label, but nothing corrects the effort.Fix
The SDK reports a subagent's applied effort only on hooks fired inside it. Their input carries
agent_id, which equals the subagent'stask_id, andeffort.level. The adapter now registersPreToolUseandSubagentStophooks that write that level onto the task. Latertask.*rows carry it, the same way snapshots correctmodel. The hook returns{}, so permissions and tool execution are unchanged.SubagentStartcarries no effort, so it is not used.Verification
highand a subagent defined atlow, confirmed the hook fields. The subagent'sPreToolUseandSubagentStopreportedagent_idequal to thetask_idandeffort.level: "low".ClaudeAdapter.test.ts, "a hook fired inside a subagent refines its seeded effort". All 141 tests inClaudeAdapter.test.tspass. Server typecheck, scoped lint, and formatting are clean.d4cd7d5c33and this branch: same project, Claude Opus 5.5 at Extra High, and the same prompt spawning theproberagent. The subagent transcript records"effort":"low"in both runs. The corrected label survives a server restart and page reload.opus-5-5 · xhighopus-5-5 · lowMade by Claude Opus 5.5 (1M context) in Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit