Token Guardian
Measured usage per engine and per kind of run, daily and per-task budgets that stop runs, runaway rules for loops, spikes, floods and stalls — enforced in the core, not the window.
The Guardian keeps agent spending predictable. It only works with numbers it can prove — usage reported by the agents themselves — and it enforces its rules in PaneScale’s core, where the interface can’t get around them.
It watches every run PaneScale starts on your behalf: Agent mode, Chat, tasks, workflows, routines, the Overnight Autopilot and Point & Fix. Your own interactive terminal panes are yours; their subscription limits are shown in Usage & limits.
Open it in Settings → Usage & Guardian, or with Budgets & Guardian on the Usage page.
Usage
The top of the page shows four numbers: today’s and this month’s measured tokens, the cost this month as reported by the CLIs at API prices, and how many runs were not reported — runs that only had time limits.
| Engine | How usage is measured |
|---|---|
| Claude Code | Live, with every model message |
| Codex | At the end of each turn |
| Text-mode CLIs | Not reported — shown as such, never estimated |
A table lists today’s and this month’s tokens and the daily budget per engine. By kind of run breaks the month down into chats, threads, teammates, tasks, workflows, routines, the autopilot and Point & Fix, with tokens and the number of runs.
Budgets
| Budget | Meaning |
|---|---|
| Token Guardian active | Turns enforcement on or off |
| Claude Code · daily budget | Tokens per calendar day, measured live. Default: 5 million |
| Codex · daily budget | Tokens per calendar day, measured at the end of each turn. Default: 5 million |
| Task budget (tokens) | Per run. Claude Code is stopped live; Codex after the turn, with no further attempt |
| Task budget (USD) | Per run, where the CLI reports cost |
Leave a field empty for no limit. Changes apply from the next attempt.
Runaway rules
Sometimes an agent goes in circles. The Guardian watches running turns continuously, not only at the end:
| Rule | Fires when | Default |
|---|---|---|
| Repeated failure | The same command fails with identical output this many times | 3 |
| Token spike | A run uses more tokens per minute than this | 250,000 |
| Output flood | A run writes more output within two minutes than this | 20 MB |
| Stall | Neither output nor file changes for this long | 900 s |
| Repeated command / No progress | The same action repeats without moving forward | — |
| Budget reached | A daily or task budget is exceeded | — |
What happens when a rule fires
You choose separately for two kinds of runs:
| Runs | Examples | Default |
|---|---|---|
| Unattended | Overnight Autopilot, routines | Stop |
| Attended | Point & Fix, chats | Pause & notify |
Stop ends the current turn and blocks the next attempt. Pause & notify holds the run and asks you.
Fired rules
Every fired rule is listed with the engine, the detail and when it happened. If it was a false alarm, tick Not a loop — the event is remembered as reviewed. The header shows how many alerts were marked, and the false-alarm rate, so you can tune the thresholds.
Run guard
During every non-interactive agent turn, a run guard checks the limits as the run goes. If a turn overruns a limit, it is stopped, and the next attempt is blocked until you decide what to do. Every turn is also capped at its time limit — ten minutes for chats and tasks, more for workflow agent steps and autopilot attempts — and the whole process tree is ended when it stops.