[FEATURE] Automatic model routing based on task complexity — use Haiku/Sonnet/Opus dynamically instead of burning the session model on every turn

Open 💬 1 comment Opened Jun 12, 2026 by Adityaraj0421

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Claude Code has no automatic model or effort routing. Whatever model the session is set to handles every turn — reading a file, processing grep output, a "yes, do it" confirmation — at that model's full rates, with the whole context re-sent each time. On Max plans that default to Opus, the most expensive model in the lineup spends the bulk of its tokens on work Haiku could do. One Max user measured 93.8% of their tokens going to Opus with zero routing happening (issue #27665, which consolidates 30+ duplicate requests for the same fix).
The existing knobs don't close the gap. /model switching is manual, and nobody re-evaluates model choice turn-by-turn. opusplan routes at the wrong granularity (plan vs. execute) and has open reports of sending 100% of traffic to Opus anyway. Subagent model: pinning lets you specify a cheaper tier, but nothing decides when to delegate to it. Effort has the same problem one level down: it's session-global, never dialed to task difficulty.
Net result: the user has to be their own router, on every turn, forever — and since nobody actually does that, the default outcome is quota exhaustion on trivial work. Cost discipline ends up assigned to the one component least suited to carry it: human attention.

Proposed Solution

Built a working version of this as a plugin while waiting for native routing: github.com/Adityaraj0421/gearbox
What it does: a SessionStart hook injects a routing policy into every session — T0 haiku for exploration and mechanical edits, T1 sonnet for implementation, T2 opus for design and hard debugging. Five tiered subagents, an escalation ladder (fail twice → escalate one tier with the failure report), an independent haiku verifier that reviews diffs against task intent before results are accepted, and JSONL telemetry of every routing decision.
Dogfooding numbers: 10/10 routing accuracy on the first real-task benchmark; the opus tier paid for itself by finding two real bugs. Best failure: given a contradictory test, the sonnet tier reward-hacked it with a stateful call counter — green tests, violated intent. That's why the verifier exists. Full story in LAUNCH.md.
Install: /plugin marketplace add https://github.com/Adityaraj0421/gearbox then /plugin install gearbox@gearbox — choose user scope at the prompt or it only routes in one folder.
Not affiliated with Anthropic. Issues welcome — the telemetry log is designed to eventually train a learned router, so real usage data genuinely helps.

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

Performance and speed

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗