Model Router
A plugin for Claude Code that makes the main session hand work to agents and keeps each agent's model and effort within the limits you set.
Model Router tells the main session that it coordinates and that agents do the work, and where its mod runs it reminds Claude to hand work over once the session has done a lot of it itself, then refuses the next work call until an agent starts. Claude names a model and effort on each Agent call, from a short table Model Router adds at session start: Haiku at medium for finding and reading, Haiku at high for writing and fixing to a brief that settles the approach, and Sonnet at high for work with an open approach or no check to run, such as a design, a review or a rewrite. The note also says an agent's report is a claim: work no check ran on gets a review by a second agent before it counts. Model Router holds those choices to your limits, fills in what a call leaves out, routes around a model that fails, and runs a call marked "Redo:" one step higher.
Model Router is an independent project, not made or endorsed by Anthropic.
Install
/plugin install model-router --marketplace crisnahine/claude-code-model-router
From a shell, claude plugin install takes the same arguments. claude plugin update model-router@claude-code-model-router updates it. The guide covers scopes and uninstalling.
Requirements
Claude Code 2.1.329 or later, sh, and Python 3.9 or later as python3 or python on your PATH. Without Python the hooks do nothing, and the mod only holds a model a call names to max_tier and min_tier.
How a call's model is chosen
A model named on the call comes first, unless CLAUDE_CODE_SUBAGENT_MODEL_FORCE pins every subagent's model. Then come a per-agent rule, the agent's own model (inherit means the parent's), CLAUDE_CODE_SUBAGENT_MODEL, and last a level from the agent's tools: lookup for one that can't edit, write or run commands, else standard. Unless an environment variable set it, Model Router holds the model to your cap, your floor and the usable models, raises it to a rule's level, and gives it that level's effort when nothing sets one. A call left on its parent's model gets no effort. The guide has the full order and the levels.
Redo
Claude marks a redo by starting the call's description with "Redo:". It climbs from the latest run of the same agent and description that finished in this session in the last 30 minutes, else from what the call would run at unmarked: one effort step up while that run was below high, else the next stronger usable model, else one more effort step. A redo that names more than that run runs as named. Workflow stages are never redone.
The check before a turn ends
When Claude or a subagent changed a project file with Edit, Write or NotebookEdit and no test runner, linter or type checker ran since, the Stop hook asks Claude once to run the work's own check. A project file an agent's shell changed counts as an edit too, and so does one Claude itself wrote through a shell heredoc or, in PowerShell, a here-string. When an agent made the change, the ask says its report is the only word on the work, and for work with no check to run (a document, an analysis, code no test covers) it asks for a review by model-router:reviewer. An agent whose name says it reviews, such as model-router:reviewer, counts as the check when it started after the edit and read files. It never asks while background work runs.
When an agent's shell command changed a project file, the plugin tells the main session which files, beside the agent's report when it comes back. A helper that rewrites a page as a side effect then shows to the main session even when the report leaves it out, and the agent isn't sent back to write its report again. When an agent's work comes back and no check has run on it, the plugin says so beside the result, so the check or the review starts before Claude writes its closing reply.
In a session