- Published on
Claude Code 2.1.292: Fine-Tune Subagent Cost and Speed with the Effort Parameter
The most painful part of multi-agent workflows is the invoice.
Breaking a big task into parallel agents speeds things up, but token costs rise in lockstep. Attaching a max-performance model to a simple file-listing task is like driving a sports car through a parking lot. Claude Code 2.1.292 solves this with a single effort parameter.
1. The Effort Parameter: A Five-Step Performance Dial
You can now pass effort when calling the Agent tool. Five levels are available: low, medium, high, xhigh, max.
Agent({
description: "Summarize file list",
prompt: "List files in src/ directory",
effort: "low"
})
Agent({
description: "Deep security audit",
prompt: "Audit all auth logic against OWASP Top 10",
effort: "max"
})
low is fast and cheap. max is thorough but slow and expensive. Pick the level that matches the stakes β you cut costs without sacrificing quality where it counts.
2. Priority Order β Which Setting Wins
When effort is set in multiple places, the hierarchy is:
CLAUDE_CODE_EFFORT_LEVELenvironment variable (absolute override)effortin the Agent tool calleffortin the subagent definition frontmatter- Parent session default (falls back to
medium)
Team leads can set the env variable to cap the whole org. A developer coding max in their call still respects the env-variable ceiling.
3. Real-World Strategy: Cut Costs with a Two-Stage Pipeline
// Stage 1: Quick scan β filter irrelevant files
const scan = await Agent({
description: "Fast file scan",
prompt: "Classify changed files β separate test files from source files",
effort: "low"
})
// Stage 2: Deep review β only the relevant set
const review = await Agent({
description: "Code review",
prompt: `Review these files in depth: ${scan.result}`,
effort: "high"
})
Use low for tasks where mistakes are obvious and cheap to catch. Use max for security audits and final code reviews where a missed issue is costly.
4. plugin install --marketplace: One-Line Setup
The same release adds a --marketplace flag to claude plugin install.
Before (two steps):
claude marketplace add
claude plugin install my-plugin
Now (one step):
claude plugin install my-plugin --marketplace
If the marketplace is not yet registered in the current environment, this flag adds it automatically and then proceeds with the install. Especially useful in onboarding scripts and CI/CD pipelines.
5. Known Bug: --max-budget-usd Overshoot
Community reports indicate a rare bug in this version where the --max-budget-usd spending cap can be exceeded. In budget-sensitive environments, add extra monitoring or wait for the next patch.
Tips
- Team cost control: Set the subagent default effort to
mediumin.claude/settings.jsonand require explicithighormaxonly where needed β this prevents surprise token bills. - EdTech use case: In an AI tutoring pipeline, a first-pass student submission review can run at
low, while the final grading agent runs athigh. Significant cost savings at scale. - CI automation: Adding
--marketplaceto your build scripts eliminates manual setup steps and reduces human error in fresh environments. - Incremental adoption: You don't have to change every agent. Unspecified agents default to
medium, so you can optimize the most expensive agents first.
Sources: