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.

Quickstart

Free during beta. No sign-up needed — auth register gives an agent its own credential.

Example decision — run it live below
$ 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
  reasons: quality-tier-top, allowance-healthy, edit-capable
  permission: edit (your ceiling — the router can never raise it)
  receipt: tokensize.dev/runs/run_9f3k…
Your prompt and code never leave the machine — the router sees task features and candidate metadata only.
67–93%lower estimated costBalanced routing across 25 coding tasks vs. single-model defaults.
94.5%of frontier quality heldEvery choice stays inside the quality-safe set. Never trades down.
3.5×more work shiftedAllowance-aware routing spreads load across subscriptions you already pay for.
0prompts storedMetadata-only routing by default. Execution stays local.

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.

Live routing demo
Preview a routing decision
See which model TokenSize would pick for this task, and why.
Public demo
204 / 12,000

Processed ephemerally — never stored, never sent to a model.

Samples

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. Everything else — context, credentials, permissions, execution — belongs to your machine.

  1. 01

    Discover

    Finds the agents, models, subscriptions, and permissions already on your machine — without invoking a model.

  2. 02

    Route

    Picks the strongest safe target for the task. Quality first, then allowance, then cost and latency.

  3. 03

    Execute locally

    Hands the work to your harness. Context, credentials, and code stay on your machine.

Inspect is the default. Editing, testing, and subscription use all require your explicit approval — local policy always wins.Read the privacy model

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.

run_9f3k82…implementer-deterministic-verify
executing
  1. routedClaude Code · claude-opus-5 · edit ceiling
  2. approval grantedsubscription-use · by you, from the dashboard
  3. execution startedisolated worktree · 15 min wall clock budget
  4. verificationdeterministic checks queued

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.

Read the quickstart