Skip to content

Guardrails for coding agents

Know what's left.
Set what's allowed.
Let your agents work.

TokenOps watches every AI plan your agents draw on and steps in during the session, before a limit, a budget or a rule you set is crossed. It can pause an agent. It can never approve one.

The checkup needs nothing installed and sends nothing · Free and open source (Apache 2.0) · macOS and Linux · no account

tokenops glance
Claude Maxweek · resets 4d 1h
70% leftlasts
Codex Proweek · resets 2d 4h
12% leftruns out Thu
Cursor Ultraweek pool · resets 5d
59% leftlasts
Paused by session-spend

Session cost $20.40 crossed your $20 line.

tokenops approve 7f3c
Illustrative plans and figures.

90+

providers read, from the plans you already have: Claude, Codex, Cursor, Copilot, Gemini, opencode, OpenRouter, Bedrock and the rest

< 0.5 ms

for the boundary check before each tool call, and it fails open

0 prompts

stored or uploaded: a team gets derived daily figures, in a format with no field for anything else

Why TokenOps

Agents work for hours now. Nobody is watching the meter.

“Limit reached. Resets in 4h.” Mid-refactor, on the plan you forgot was nearly spent, while another plan sat at 70% left. TokenOps holds one line across every plan and every harness, so that moment comes with a warning instead.

Know what's left, on every plan

Every 5-hour, weekly and monthly window across your vendors, with its pace and when it resets. A reading that stopped shows its age; it never passes for current.

Where each figure comes from →

Limits set before work starts

A session cost, the last 5% of a plan, a subagent on a bigger model. Every rule starts in shadow, and only a person at a terminal can approve, never the agent that was stopped.

Action boundaries →

Private by construction

Prompts are read where your client wrote them and never stored. Only derived numbers are kept, in a SQLite file under ~/.tokenops. No account, no telemetry, and every outbound call named.

What leaves your machine →

How it works

Look first. Wire it once. Promote what you trust.

The harness runs the work; TokenOps reads what it leaves behind and governs around it. Nothing changes until you say so.

  1. See last week first

    The checkup reads what your agents already wrote on this machine: tokens, their value at API prices, and each leak with the command that fixes it.

    npx @klarlabs-studio/tokenops checkup
  2. Install and init

    One Homebrew cask, then init finds your clients and plans, wires the MCP server and hooks, and asks only what it can't tell.

    tokenops init
  3. Glance at the headroom

    Every plan window with its pace, in the terminal, the status line, the macOS menu bar and the agent's own context.

    tokenops glance
  4. Promote your first boundary

    Init adds the headroom pause and the loop breaker in shadow. After a few days of what they would have stopped, promote the one you trust.

    tokenops boundaries promote headroom-pause

Every boundary starts in shadow. It records what it would have done and blocks nothing until you promote it.

Built for agents

Built for the session it's in, not next week's report.

A loop breaker pauses the fourth call that repeats with nothing changed. A redundant file read is refused before it costs a token. A long command output is cut to what the agent needs.

MCP tools in the agent's own context

Before a long task the agent asks tokenops_glance for each plan's windows and pace. A tool call that would change a setting asks you first, outside the agent's turn, and applies only on your yes.

The MCP server →

Boundaries the harness enforces

Claude Code, Codex and opencode refuse the tool call a rule stops. Codex's hook cannot ask, so a rule that asks refuses there with the tokenops approve command. Cursor gets the same rules as advice.

Where each rule is enforced →

Compared

What you use today stops at its own edge.

Each vendor's own toolsUsage metersGateways & budget toolsTokenOps
Every plan in one viewits ownyesits own trafficyes
Acts before a window runs outits own harnessalertsat the capevery harness
Limits with approvalits own seatsnoyesacross every account
Prompts stay on your machineyesyesno — it sees themyes

Checked against each vendor's release notes on 2 November 2026. The full comparison →

Pricing

Free on your machine. Free for your team in the beta.

Everything TokenOps does for one developer's work is open source. The team plane adds what needs more than one person's figures.

Available now

Open source

Freefor every developer, Apache 2.0

  • Headroom on every plan you use
  • Status line, menu bar and MCP tools
  • Loop breaker, read guard, output compression
  • Your own boundaries and approvals
Install it

Beta

Team

Free in betano card · hosted in Germany

  • Rules owners set, signed, that members can tighten but never loosen
  • Approvals by role, with who answered on record
  • Rollups by team, repository and kind of work
  • tokenops team preview prints an upload before it is sent
Join the beta

Start in 90 seconds

Run the checkup. Your agents' week is already on disk.

No install, no account, nothing sent. When you want the guardrails, install the cask and run tokenops init.

Shipping now: v0.125.0 · Contribute

Try it, nothing installed

Install on macOS

Apache 2.0 licensed. · Design system