Measured, not estimated

Why the Token Guardian shows “not reported” instead of a guess — and how real budgets stop runs instead of turning numbers red.

It would have been easy to show a token number for every agent. Count the characters in and out, divide by four, done. The dashboard would look complete. It would also be wrong in ways that matter.

The problem with estimates

Agents don’t send what you see. They send system prompts, tool definitions, file contents they read, previous turns, cached context. A character count of the visible terminal misses most of it. Estimates can be off by a factor of ten, and not consistently in one direction.

A budget built on an estimate is worse than no budget: it stops a run that was fine, or lets through one that wasn’t.

Where the tokens actually go

It is worth spelling out what a single agent turn contains, because it explains why the visible conversation is a poor proxy:

Part of a turnVisible in the terminal?Typical share
System prompt and tool definitionsNoLarge and repeated every turn
Files the agent readPartly — usually just the file nameOften the biggest part of a coding turn
Previous turns of the conversationScrolled awayGrows with every turn
Output of commands the agent ranSometimes collapsedLarge for test runs and builds
What you typedYesSmall
What the agent wrote backYesSmall to medium

Caching changes the cost of repeated parts but not the fact that they are sent. Anthropic’s guidance on context engineering describes the context window as a budget that every file read and every tool result draws from — which is exactly why a long coding session costs far more than its visible text suggests.

The consequence: two turns that look identical on screen can differ in usage by an order of magnitude, depending on what the agent read along the way. Only the agent itself knows the real number.

Where real numbers come from

Some CLIs report their usage. Claude Code includes it in the final result event of every turn; Codex reports it when a turn ends. When an agent runs through PaneScale’s runner, those events are parsed as they stream — so the Guardian sees real numbers while the work is happening.

For CLIs that don’t report usage, the Guardian says exactly that: not reported. It is a less impressive dashboard and a more trustworthy one.

The same rule applies to subscription limits. The percentage left in each limit window and its reset time come from the provider’s own data, read locally — never computed from a guess about what the plan allows.

Budgets that act

A daily budget per engine is only useful if crossing it changes something. In PaneScale it does:

  • During a turn, a run guard checks limits continuously, not only at the end.
  • When the budget is crossed, the run is stopped — or paused with a notification, if you prefer — and the next attempt is blocked.
  • Chats, tasks, workflows, routines, Point & Fix and the autopilot all draw from the same budgets.

Claude Code and Codex start with five million tokens per day each. That is generous for interactive work and tight enough to catch a runaway night. Adjust it to your subscription.

There is a difference between the two engines worth knowing. Claude Code streams its usage during the turn, so a task budget can stop it live. Codex reports at the end of a turn, so the Guardian stops it after the turn that crossed the line and blocks the next attempt. Both stop; one is a little more precise.

Loops are a special case

The most expensive failure mode isn’t a big task — it is a small task repeated forever. An agent edits a file, a check fails, it makes the same edit again, the check fails again. Each round looks reasonable on its own.

The Guardian looks for repeated identical work and pauses the run when it sees a loop. Sometimes repetition is legitimate — a migration touching similar files, for example. Mark that event Not a loop and the run continues.

“Loop” covers more than one shape, so the Guardian has several rules, each with a threshold you can change:

RuleWhat it catchesDefault
Same errorThe same command failing with identical output3 times
Token spikeUsage per minute far above normal250,000 tokens per minute
Output floodA run printing megabytes of output20 MB in two minutes
StallNo output and no file changes900 seconds
Repeated command / no progressThe same action again without moving forward—

Unattended runs — the autopilot, routines — are stopped when a rule fires; attended ones such as chats are paused and you decide. Every triggered rule is listed afterwards, and the share you marked as false alarms tells you whether a threshold is too tight.

What we recommend

  • Set budgets per engine that match your plan, not your hopes.
  • Keep loop detection on, especially for overnight runs.
  • Treat “not reported” as a reason to use structured CLIs for long unattended work.
  • Check your provider’s own usage page from time to time. The Guardian protects you from runaway runs; your provider’s numbers are still the ones you pay.

A note on honesty in dashboards

The temptation to fill every cell is real. An empty field looks like a missing feature, and a number — any number — looks like progress. But a number on a dashboard is a promise that someone measured it. When nobody did, the honest display is the one that says so. That is a small design decision with a large consequence: when the Guardian shows a number, you can act on it.

How to set a budget you won’t regret

A budget that stops good work is as annoying as one that lets bad work through. Three steps get you to a sensible number:

  1. Watch a normal week first. Leave the budgets generous and look at the Usage page at the end of each day. Note the highest day for each engine.
  2. Set the daily budget a little above that peak. It should only fire on a day that is clearly unusual — a loop, a runaway night — not on a busy but normal day.
  3. Use task budgets for unattended work. A per-task limit for the autopilot and routines catches a single task that goes wrong without stopping the rest of the night.

Revisit the numbers when your plan changes or your way of working does. A budget is a statement about what normal looks like; it should change when normal does.

Usage, limits and budgets are three different things

These three words get mixed up, and the difference matters:

  • Usage is what an agent actually consumed — tokens, and cost where the CLI reports it. PaneScale shows it per engine and per kind of run.
  • Limits are what your provider allows in a time window — the five-hour and weekly windows of a Claude or Codex plan, with their reset times. They are the provider’s rules.
  • Budgets are your own rules on top: a daily or per-task ceiling that PaneScale enforces before the provider’s limit is reached.

Usage tells you what happened, limits tell you what is left, and budgets decide what is allowed. A good setup uses all three.

Sources

More articles

Checkpoints that never touch your branch

How PaneScale snapshots a working copy byte for byte without moving HEAD, the index or any branch — and why rewinding refuses to overwrite your edits.

Why the second pane opens instantly

Starting a coding CLI takes seconds. Pre-warmed sessions hide that wait — here is how we do it without eating your memory.

Memory is context, not commands

Teammates in PaneScale remember. Here is why everything they remember is passed as context and never as instructions — and why that matters for safety.