[FEATURE] Add per-call effort parameter to the Agent (Task) tool
Summary
The Agent (Task) tool accepts a per-call model override, but no effort override. To spawn a single subagent at a different reasoning effort than the session, you must pre-author a whole agent definition file with effort: frontmatter — there is no way to set it at call time.
Motivation
Effort is the main cost/quality dial, and the right level is task-shaped, not agent-shaped: the same general-purpose agent might do a trivial file sweep (low) or a deep design review (high) in the same session. Today the options are:
- session-wide (
/effort,/model,CLAUDE_CODE_EFFORT_LEVEL) — affects everything, not the one spawn; effort:frontmatter in a.claude/agents/*.mdfile — requires creating a persistent agent definition for what is a one-off call.
Creating a throwaway agent file just to change one spawn's effort is heavy friction, and it forks agent definitions into foo-low/foo-high variants.
Precedent
- #25669 — same request, closed as completed, but no changelog entry ever shipped a Task-tool
effortparameter; only agent-frontmattereffort:exists (referenced in the changelog's status-bar fix note). - #25591 — same request for teammates/subagents, closed as duplicate and locked.
Both are locked; the auto-close bot directs filing a new issue referencing them.
Proposed shape
Add an optional effort parameter alongside the existing model parameter:
{
"subagent_type": "general-purpose",
"model": "opus", // existing per-call override
"effort": "high", // proposed: "low" | "medium" | "high" | ...
"prompt": "..."
}
Precedence mirroring model: call-time effort > agent frontmatter effort: > inherited session effort.
Acceptance criteria
effortis accepted on Agent/Task tool calls and applied to that subagent only.- Omitted → current behavior unchanged (frontmatter, else session inheritance).
- Invalid values rejected with a clear error; levels unsupported by the resolved model handled the same way
/efforthandles them.
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
It's worth flagging that the reaction count here understates the demand: this is the third time it has been asked.
#43083 asked for exactly this — frontmatter and per-invocation effort — collected 59 👍 / 14 ❤️, and was closed as completed when frontmatter-only
effort:shipped. Commenters said at the time that frontmatter misses the point. #39220 was closed as not planned. Those votes never carried over here, so this issue reads as a 7-reaction request for something ~70 people have already asked for.The cost is concrete. Effort is a property of the task, not of the agent: the dispatcher knows how demanding the work is, the agent file cannot. So every level becomes a duplicate file — I keep
implementer.md/implementer-xhigh.mdandreviewer.md/reviewer-xhigh.md, identical but for one frontmatter line, with the role text kept in sync by hand. A one-off dispatch at a higher level means authoring a permanent agent, and it is not dispatchable until the session picks the new file up.The ask is small: an optional
effortbeside themodeloverride that already exists on the Agent call, with call > frontmatter > session precedence.Note that the
agentfunction in Workflow scripts has aneffortparameter that overrides the value defined in the specified agent definition. This implies theAgenttool not having theeffortparameter is inconsistency gap.Re-tested on Claude Code 2.1.263 (2026-09-06). Adding one data point that may be useful for triage: a per-call
effortfield on the Agent tool is accepted without a validation error but silently ignored.Setup: lead session at
mediumeffort, four spawns via the Agent tool,effortread from the assistant entries in<session>/subagents/agent-*.jsonl.| spawn | Agent call | subagent transcript
effort||---|---|---|
| Sonnet,
effort: "low"passed | accepted |medium(inherited from lead) || Sonnet, no effort field | accepted |
medium|| Haiku,
effort: "low"passed | accepted | noeffortfield written || Haiku, no effort field | accepted | no
effortfield written |So today the only working levers are still the agent definition's frontmatter
effort:(which a plugin-shipped agent cannot expose to the user) or a session-wide/effortchange before the spawn. Since the tool already accepts the key, a validation error or a working override would both be an improvement over the current silent drop.Related: #79866 (same need from the plugin-shipped-agent angle).
+1, with a concrete case. We ship a verifier subagent in a plugin (
model: fable,effort: medium). Per dispatch we can overridemodelvia the Agent tool, but noteffort. So "default medium, raise it when asked" means maintaining a second agent file (fresh-verifier-high) that's identical except foreffort: high. An optionaleffortparameter on the Agent tool, overriding frontmatter the same waymodeldoes, would remove the need for these variants.+1. Same need: main session at
high, read-only scouts atlow, picked per call instead of forking agent definitions.+1. Data point from Claude Code 2.1.278 (2026-09-21), macOS.
Use case: a Fable 5.1 session at low effort as coordinator, wanting to dispatch heavy implementation to Opus 5 at high.
model: opusworks per call, but effort still can't be set at call time, so the only route is a.claude/agents/opus-high.mdwitheffort: high.Two frictions with that workaround, both of which a per-call parameter would remove:
Agent type 'opus-high' not found); it only appears after a restart. A coordinator that decides mid-session it needs a high-effort worker has to stop and reopen.--debuglogs the model (source=agent:custom:opus-high,model=claude-opus-5[1m]) but not the effort, so there's no way to confirm the frontmatter took. The binary's agent schema does declareeffort("low, medium, high, max, or an integer"), so it's presumably applied.Effort is a property of the task the orchestrator is handing off, not of the agent file. Call-time
effort> frontmatter > session, mirroringmodel, is the shape that fits how orchestration actually happens.+1. Two points not raised yet in this thread:
The frontmatter workaround is overridden by the env var. Per model-config, frontmatter effort applies "overriding the session level but not the environment variable". Anyone who sets
CLAUDE_CODE_EFFORT_LEVELin their shell (a common way to pin a session default) silently loses everyeffort:in their agent files. The only per-agent lever stops working, and nothing tells you. A call-timeeffortshould rank above the env var, the same way the call-timemodelranks aboveCLAUDE_CODE_SUBAGENT_MODEL.Multi-model routing already works with per-call effort everywhere except the Agent tool. Our repo instructions route work across tiers by model and effort: an Opus review at
highand Opus exploration at the session default, alongside another vendor's CLI that takes--efforton every call. Every tier can be written as "model + effort per call" except the Claude subagents, which need a separate agent file (opus-reviewer.md) that exists only to raise effort. The routing table in our CLAUDE.md can't express the Claude rows the way it expresses the others.Shape as proposed: call-time
effort> frontmatter > session, mirroringmodel.