Receipt-bound execution and provider outcomes become idempotent success/failure observations.
The routing layer for local coding agents
Every task gets
the right agent.
TokenSize discovers the coding agents already on your machine — Codex, Claude Code, Cursor, OpenCode, Copilot — and routes each task to the strongest one that is safe to use. Quality first, allowance-aware, and your prompts stay local.
Free during beta. No sign-up needed — auth register gives an agent its own credential.
$ tokensize route --task "Fix the flaky auth test" --role implement
✔ discovered 3 harnesses · 14 models · allowances read
✔ quality-safe set: 5 candidates
→ Claude Code · claude-opus-5 subscription · allowance healthy
learning: guarded · content-free outcomes only
reasons: quality-tier-top, allowance-healthy, edit-capable
permission: edit (your ceiling — the router can never raise it)
receipt: tokensize.dev/runs/run_9f3k…Live demo
Type a task.
Watch the decision.
This is the same decision engine the CLI calls, running against the hosted model catalog. It previews the route only — nothing executes, and prompts are processed ephemerally. The public preview uses the static catalog; authenticated agent routes can additionally use content-free Router Brain signals learned from verified outcomes.
Processed ephemerally — never stored, never sent to a model.
Ready when you are
Pick a sample task or write your own, then preview the route. The decision and its reasoning appear here.How it works
Hosted judgment.
Local execution.
The hosted service makes one decision well: which of your agents fits this task right now. It can learn from verified outcomes without reading the work. Everything else — context, credentials, permissions, execution — belongs to your machine.
- 01
Discover
Finds the agents, models, subscriptions, and permissions already on your machine — without invoking a model.
- 02
Route
Picks the strongest safe target for the task. Quality first, then allowance, then cost and latency.
- 03
Execute locally
Hands the work to your harness. Context, credentials, and code stay on your machine.
- 04
Learn safely
Verified outcomes update a content-free task bucket. Confidence gates every change, and failures can be quarantined or rolled back.
Run documents
Every delegation,
on the record.
Each routed task becomes one durable Run document: the decision and its reasons, an append-only event timeline, approvals, and verification. Your agents write to it from the CLI; you watch it live, approve, or cancel from the dashboard. Content-free by schema — no prompts, code, or output can be stored in it.
- routedClaude Code · claude-opus-5 · edit ceiling
- approval grantedsubscription-use · by you, from the dashboard
- execution startedisolated worktree · 15 min wall clock budget
- verificationdeterministic checks queued
Router Brain
The next route is sharper
because the last one was verified.
TokenSize improves per task shape from explicit outcomes — never from prompt collection. A conservative posterior can calibrate a candidate, promote a proven route, or quarantine a failing one. Quality gates, allowance, and your local policy remain in charge.
Only coarse task buckets and bounded counts travel to the service — never prompts, paths, transcripts, or output.
Signals need confidence before they influence routing; quarantine and rollback are first-class states.
Works where your agents work
One router, four surfaces.
The skill, the CLI, the plugins, and the MCP server all share the same local client, the same policy file, and the same privacy boundary.
CLI
Route, delegate, watch runs, and send feedback from any terminal.
npx @tokensize/cli@beta route --task "…"Quickstart Codex plugin
Install once, then ask for $delegate inside any Codex session.
codex plugin marketplace add tokensize/skillsCodex setup OpenCode plugin
Typed tools backed by the same local client. Inspect-only by design.
"plugin": ["@tokensize/opencode@beta"]OpenCode setup MCP server
A stdio MCP server for any MCP-capable agent environment.
npx --yes @tokensize/mcp@betaReference Two minutes to the first route
Install the skill.
Keep your subscriptions.
One command to install, one to register, one to route. TokenSize coordinates the agents you already own — it never replaces them.