Pick an agent for each stage
Investigate with one model, implement with another, review with a third. When you move a stage, the config, the diagram above, and the terminal below update to match.
Stages
Harnesses
Click a stage, then a harness to move it there.
Drive it from the keyboard
Everything happens in one terminal. This mock uses the real TUI layout and the stages you picked above. Click it and press r.
| Harness | Status | Structured output | Used by |
|---|
Checked by model-router doctor. No model request was sent.
Background stages
Research, review, and the closing brief run in the background with their own timeouts. mr tells you when a run needs input.
Interactive stages
Implementation opens the harness's own terminal. Detach with Ctrl+B, quit mr, and come back to the same screen.
Structured handoffs
Each stage hands the next one a summary, verdict, findings, and test evidence instead of its raw output.
Let a stage hand work to other agents
Turn on delegation for a stage and its agent can pass self-contained tasks to other harnesses and models in the middle of a run. The agent only asks. The router launches each task and controls its process, sandbox, and cost.
Read-only or in a worktree
A shared task reads the parent's checkout and can't write to it. A worktree task works on a copy and returns a patch the parent applies with
task_apply.No more access than the parent
Each task runs unattended in its own OS sandbox and can't get more write access, native permissions, or network than the stage that started it.
Results wake the parent
When its tasks finish, the router starts a follow-up turn of the parent with their results.
Schedules need your approval
An agent can propose a recurring run. It fires only after you approve it with
model-router schedules approve.
Claude Code, Codex, OpenCode, and custom adapters can delegate, including from interactive stages. Any harness can take a task. Delegates in a repo's config need model-router trust.
# .model-router.toml [delegates.codex-review] harness = "codex" model = "gpt-6.2-sol" effort = "high" [delegates.claude-impl] harness = "claude" model = "claude-opus-5-5" isolation = "worktree" [[workflows.stages]] id = "implement" harness = "claude" [workflows.stages.delegation] delegates = ["codex-review", "claude-impl"] max_parallel = 3
What it won't do without asking
Model Router starts other agents. It doesn't store their keys, loosen their permissions, or commit to your repository unless you tell it to.
No commits by default
Only a ship stage commits, on a new branch, after you confirm a preview.
No stored credentials
It reads provider keys from your environment at launch and redacts them in saved records and previews.
Native permissions
Each harness keeps its own approval rules unless a stage overrides them.
Trust before commands
A repo's config can't run checks, custom adapters, or delegates until you run model-router trust.
No silent model swaps
A failed stage stops and offers retry, a replacement model, or resume.
Processes end with their stage
When a stage ends, its harness process group ends too. An optional bubblewrap or sandbox-exec sandbox per stage keeps Git config and hooks read-only.
Supported harnesses
Install and log in to the ones you use. model-router doctor checks what it finds without sending a request.
- Codex structured output
- Claude Code structured output
- Gemini
- Amp
- Cursor
- OpenCode
- Aider
- Goose
- Copilot
- Pi
- omp
- Your CLI custom adapter
# build from source and try the whole flow offline, no model calls git clone https://github.com/Tyru5/model-router cd model-router && cargo run -- --config examples/demo.toml # see exact commands, nothing launched model-router preview --task 'Respect Retry-After' # run it unattended in an isolated worktree model-router run --task-file spec.md --unattended --worktree # retry a stage with a different model model-router resume r-0418 --retry --model opus # read the brief and the diff model-router report r-0418 --diff # approve a schedule an agent proposed model-router schedules approve s1 # run as an MCP server for other agents model-router serve --mcp
Want something better? Use T3 Code.
T3 Code t3.codes →
Better. The industry-leading standard for agent orchestration.
Model Router
A different tool that runs only in the terminal and CLI.