Why#
A Claude subagent whose agent definition sets its own effort is labeled with the thread's effort instead. From a thread at Extra High, a prober agent defined with effort: low shows opus-5-5 · xhigh in the Agents panel, while its transcript records "effort":"low" on every turn.
task_started carries no effort, so the Claude adapter seeds the label from the Agent tool's effort input 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's task_id, and effort.level. The adapter now registers PreToolUse and SubagentStop hooks that write that level onto the task. Later task.* rows carry it, the same way snapshots correct model. The hook returns {}, so permissions and tool execution are unchanged. SubagentStart carries no effort, so it is not used.
Verification#
- A live probe on Agent SDK 0.3.276 and Claude Code 2.1.281, with the session at
high and a subagent defined at low, confirmed the hook fields. The subagent's PreToolUse and SubagentStop reported agent_id equal to the task_id and effort.level: "low".
- New:
ClaudeAdapter.test.ts, "a hook fired inside a subagent refines its seeded effort". All 141 tests in ClaudeAdapter.test.ts pass. Server typecheck, scoped lint, and formatting are clean.
- Real web client, base
d4cd7d5c33 and this branch: same project, Claude Opus 5.5 at Extra High, and the same prompt spawning the prober agent. The subagent transcript records "effort":"low" in both runs. The corrected label survives a server restart and page reload.
Before: opus-5-5 · xhigh | After: opus-5-5 · low |
|---|
 |  |
Made by Claude Opus 5.5 (1M context) in Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit#
- New Features
- Subagent progress updates now reflect the effort level reported during execution. When a subagent’s effort differs from the session’s initial setting, its subsequent progress event shows the updated level, providing a more accurate view of how the task is proceeding.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes