
effortmining

Spend the reasoning each subtask deserves — no more, no less.
Claude Code makes every helper agent think as hard as your whole session. Most helpers don't need to. effortmining right-sizes reasoning effort per subagent and cuts output-token spend ~64.7% with no drop in quality — measured, not vibes.
Install
claude plugin marketplace add nagisanzenin/effortmining
claude plugin install effortmining@effortmining
Requires Python 3 (stdlib only). Start a new session — that's it. It works from the first delegation, nothing to configure.
The problem, in one picture
Claude Code has a "how hard should I think" dial (low → max). When it spawns a subagent, that subagent inherits your session's setting — there's no way to set effort per spawn. So every helper runs at the same effort, whether it's grepping a file or debugging a crash. And effort costs tokens.
SESSION EFFORT: max (no per-spawn setting — every helper inherits it)
grep a file ......... max <- overkill
reformat a list ..... max <- overkill
read a diff ......... max <- overkill
run the tests ....... max <- overkill
debug a crash ....... max <- the only job that actually needed it
What effortmining does
It classifies each subtask, looks up the cheapest effort tier proven sufficient for that kind of work, and dispatches a worker pinned at that tier.
effortmining right-sizes each job:
grep a file ......... low
reformat a list ..... low
read a diff ......... low
run the tests ....... low
debug a crash ....... high
four cheap jobs go cheap, the hard one keeps its effort.
=> 64.7% fewer output tokens, same pass rate.
Measured (~450 pre-registered runs on claude-opus-4-8): calibrated dispatch used 64.7% fewer output tokens (95% CI [60.8, 67.8]) than effort inheritance, at an identical pass rate. max never beat xhigh anywhere. Two pre-registered tests failed and are published below, not buried.
Why the savings are real
Thinking harder genuinely burns more tokens — but past a point it buys nothing. Median output tokens per tier, across the same tasks, with every tier reaching the quality ceiling:
low 101 ██
high 158 ███
xhigh 295 ██████
max 696 ██████████████ <- 7x low, and it never won a single task
max doesn't get things wrong — it just costs 7x for the same answer. That gap, multiplied across every subagent your session spawns, is the waste effortmining removes.
Using it — three modes
-
Ambient (default): install and forget. A SessionStart hook injects a one-line dispatch policy, and from then on Claude picks the right-effort worker on its own. On a new session you'll see:
[effortmining] calibration table 6 cells, fitted 2026-07-07 · /effortmine to dispatch calibrated
[effortmining] ambient dispatch policy: ... T1-mechanical->miner-low · T3-moderate-reasoning->miner-high ...
Watch the task line when Claude delegates — you'll see miner-low doing grunt work instead of a full-effort agent. Your explicit effort requests always override the table.
-
Precise: hand a multi-part job to the orchestrator and watch it decompose:
/effortmine (1) extract the domains from these emails into a sorted list: [email protected], [email protected], [email protected]
(2) this function should return the second-largest unique number but breaks on some inputs — find and fix:
def second_largest(xs): s = sorted(set(xs)); return s[-2]
It classifies (1) as mechanical → miner-low, (2) as diagnosis → miner-high, dispatches both, and tells you why.
-
Measured: /effort-bench — re-run the benchmark on your own account, or refit the table for a different model with python3 bench/effort.py calibrate. The whole pipeline is deterministic and resumable.
How it works (the whole trick)
1. Five workers, one line apart. Claude Code's Agent tool has no per-spawn effort parameter — you can override a subagent's model, not its effort (verified against the CLI binary and docs, see docs/research/). The only place effort can be set is an agent's definition file. So effortmining ships five workers that are byte-identical except one frontmatter line:
agents/ — pick a tier by picking a file:
miner-low.md -> effort: low
miner-medium.md -> effort: medium
miner-high.md -> effort: high
miner-xhigh.md -> effort: xhigh
miner-max.md -> effort: max