Subagent Model Router FOR CLAUDE CODE

When Claude Code fans out helper agents, they inherit the session's model by default, usually the most expensive frontier tier, even for jobs as simple as searching files. This kit installs a routing brain plus an enforcement gate on Claude's agent tool: every subagent gets a deliberate, right-sized model choice, and quality is never traded for token savings. Version 2.0 adds a hardened gate, an optional local route log so you can see the routing decisions with real data, and an optional update notice.

One thing first

Leave your name and email so Steve knows who's running the kit. That is the entire purpose. The record kept is your name, email, and submitting IP (normal web-log stuff). No newsletter, no emails to you at all, never shared. It unlocks the install prompt below.

Step 1: copy this, paste it into Claude Code, done.

That is genuinely the whole job. Your Claude fetches the install protocol from this page, explains what it's doing, and verifies everything. It typically takes a couple of minutes when the prerequisites (Claude Code plus python3) are in place.

The install prompt
Read https://voliton.ai/model-routing/AGENT_INSTALL.md and follow it exactly, step by step, to install the Subagent Model Router for my Claude Code. Explain what it does in plain language before you start, and wait for my OK before changing anything. If the kit status says it isn't live yet, just tell me when to come back.

Step 2: what your Claude will set up

A required core of three small local changes, plus three optionals you choose during the install. Everything is reversible with the uninstall appendix in the protocol.

The doctrine

A "Subagent Model Routing" section in your global CLAUDE.md: classify every subagent task, pick the model (and effort level) from a routing table, and only choose the cheaper tier with 9-out-of-10 certainty the result will be just as good. Doubt always escalates UP. New in v2.0: an independence rule, so work that gets graded against a bar is judged by a different model family than the one that produced it whenever you have one installed.

The enforcement gate

A PreToolUse hook on Claude's agent tool that blocks any subagent launched there without an explicit model choice, bans haiku-class models outright (full model IDs included), and, if you opt into the model allowlist, blocks off-list models too. A forgotten choice bounces, and Claude routes properly on the retry. Honest scope: paths like Workflow scripts do not pass through the hook (the author verified this by live probing), so on those paths the doctrine is the enforcement, and it says so itself.

The optionals

A local-only route log (one JSON line per spawn: which model was asked for, which actually ran, tokens used) that never leaves your machine. A structural model allowlist in settings. A notify-only update check that pings this site at most once a day for a version number and never changes anything by itself.

The live-fire proof

The installer deliberately tries to launch a banned-tier agent and shows you Claude Code blocking it live. You watch the gate work before the installer calls it done.

The routing table

Task profileRouted to
Architecture, security, audits, hard debugging, synthesis, judging other agents' work, anything ambiguousfrontier (opus / fable*)
Search, file inventory, fact extraction, summarizing known docs, mechanical edits, running testssonnet
Anything, evernever haiku

*The doctrine routes to the strongest model available in your install: fable where you have it, otherwise opus. Bonus: if you have the Codex CLI (GPT 5.6 class) or Gemini CLI (3.1 Pro or newer) installed, the doctrine also routes independent audits and million-token document jobs to them. On strength, never on price.

The honest fine print

This edits your global Claude Code config (~/.claude/). The required core: one small Python hook (about 180 lines), one hook entry merged into settings.json after a timestamped backup (your existing settings are preserved, never replaced), one marker-fenced section appended to CLAUDE.md. The optionals each add one more small file or settings entry, and the installer asks you about each one before touching anything. One side effect said plainly: if your settings already contain an availableModels list, the gate will enforce it on agent-tool spawns even if you skip the allowlist optional; the installer tells you if that applies to you.

The telemetry truth: the core kit makes zero network requests after install, and the route log (if you choose it) is a local file the kit never transmits. The optional update check makes one https request a day to this site for a version number; the server sees an ordinary access log entry. Beyond that, the only traces anywhere are the opt-in record you leave on this page (name, email, IP) and the access log entries from downloading the kit. Uninstall surgically removes the kit's hook entries, config keys, scripts, and doctrine block, spelled out step by step in the install doc. You choose whether to keep the route log; the timestamped settings backups are deliberately kept for your safety; and the availableModels key may remain until you remove or restore it by hand. Your Claude explains every step in chat before running it.

The money truth: this is quality-first, not a cost-cutter. Four squares, find yours: frontier-model sessions on API billing usually save money; frontier on a flat subscription saves rate-limit and latency budget, not dollars; cheaper-model sessions on API billing can cost more (haiku banned, doubt escalates up); cheaper models on a subscription get better quality and some latency, no dollar change. The installer asks which applies to you and says it plainly.

Optional approval mode: want a human hand on the launch lever? One config line makes Claude post its routing plan (which agents, which models, why) and then wait for your explicit click before any agent-tool subagent starts. That is the main fan-out path and the hook's whole surface: Workflow-script and team spawns cannot be mechanically approval-gated by this kit, and the doctrine says so. Off by default; the installer offers it at the end.