Agent tool ignores `effort:` frontmatter in subagent .md files — inherits global effortLevel instead
Summary
When spawning subagents via the Agent tool, the effort: field declared in the subagent's .md frontmatter is ignored. All subagents inherit the global effortLevel from .claude/settings.json regardless of their individual frontmatter declaration.
Environment
- Claude Code version: latest
- Project settings:
.claude/settings.jsonwith"effortLevel": "xhigh" - Subagent files in
.claude/agents/with varyingeffort:frontmatter values
Steps to Reproduce
- Create
.claude/settings.jsonwith"effortLevel": "high" - Create a subagent file
.claude/agents/agent-a.mdwith frontmattereffort: low - Create a subagent file
.claude/agents/agent-b.mdwith frontmattereffort: xhigh - Spawn both subagents via the
Agenttool in the same session - Observe: both subagents run at
high(the global setting), not at their declaredeffort:level
Expected Behavior
Each subagent spawned via the Agent tool should use the effort: value declared in its own frontmatter, allowing per-agent effort configuration.
Actual Behavior
All subagents inherit effortLevel from the parent session's .claude/settings.json, ignoring the frontmatter effort: field entirely.
Impact
This makes it impossible to build multi-agent pipelines with differentiated effort levels per role. A natural pattern is having some agents that perform simple, mechanical tasks (effort: low) alongside others that require deep reasoning (effort: xhigh). With the current behavior, the global effortLevel must be set to the highest required value, causing all agents — including lightweight ones — to run at maximum effort unnecessarily.
Workaround
Set effortLevel globally to the highest required value and accept the token overhead for lower-effort agents.
Request
Respect the effort: frontmatter field when spawning subagents via the Agent tool, using it to override the global effortLevel for that specific subagent invocation.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Per-agent effort is also an accounting problem.
Each Agent spawn should preserve four fields: agent file path/hash, declared
effortfrom frontmatter, inherited global effort, and effective effort used for the child session. If the child inherits because frontmatter is unsupported or overridden, that reason should be explicit.That gives cost tooling a clean explanation for "cheap scout ran at xhigh" cases, and it gives users a regression target: parent high + agent low should either run low or report the mismatch before work starts.
---
_Generated with ax._
Still reproduces on 2.1.215 (macOS). Two data points that make this easy to confirm, plus a second affected surface:
1. Transcript-level proof (frontmatter path)
Since 2.1.212 session transcripts record the reasoning effort on each assistant message, so no eyeballing is needed:
~/.claude/agents/coder-low.mdwithmodel: opus,effort: low(key/value per the sub-agents docs, which say frontmattereffort"overrides the session effort level").effortLevelin settings.json set higher.<project>/<session-id>/subagents/agent-*.jsonl:The child records exactly the parent session's effort on every assistant message; the frontmatter value never reaches the request.
2. The Workflow tool's per-call
effortopt is dropped tooagent(prompt, {agentType, effort})documents aneffortoption, but it's silently ignored the same way. A/B probe: same prompt to the same custom agent ateffort: 'low'vseffort: 'max'— a mental-arithmetic task with "verify by an independent method before answering" (48273 × 91457):| probe | recorded effort | thinking chars | output tokens | answer |
|---|---|---|---|---|
|
effort: 'low'|high(inherited) | 0 | 6 | wrong ||
effort: 'max'|high(inherited) | 0 | 6 | wrong (different) |Identical recorded effort, identical zero-thinking behavior at both extremes — a genuine
maxwould not blurt a wrong 10-digit product with no thinking. So the override is dropped before the request, not just mislabeled in the UI.Note: the Workflow side was reported in #64033 but auto-closed as a duplicate of #43083, which is a feature request. Since
agent()'seffortopt is already documented in the tool schema and silently dropped, it's the same bug as this issue, not a missing feature.Impact
Any routing setup that pairs a big model with low effort for cheap mechanical work (a common cost/latency pattern) silently runs every such subagent at the session's full effort instead.
I can confirm this on Windows using Claude Code 2.1.219