Token Guardian
Measured usage per engine and per kind of run, daily and per-task budgets that stop runs, loop rules for repeated errors, 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 agent run PaneScale starts on your behalf: Chat and project threads, teammates in Agent mode, tasks, workflows, routines, the Overnight Autopilot, Point & Fix and the Video Studio agent — budgets before the start, rules live during the work. 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 and This month (measured tokens), Cost (month) as reported by the CLIs at API prices, and Not reported — runs without measurement 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 |
Per provider lists today’s and this month’s tokens and the daily budget per engine. Per run type (month) breaks the month down into chats, threads, teammates, tasks, workflows, routines, the autopilot, Point & Fix and the Video Studio agent, 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.
Loop rules
Sometimes an agent goes in circles. The Guardian watches running turns continuously, not only at the end:
| Rule | Fires when | Default |
|---|---|---|
| R1 · same error | The same command fails with identical output this many times | 3 |
| Token spike per minute | A run uses more tokens per minute than this | 250,000 |
| Output flood (MB in 2 min) | A run writes more output within two minutes than this | 20 MB |
| Stall (seconds) | 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
Under 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 & report |
Stop ends the current turn and blocks the next attempt. Pause & report really pauses the run and asks you in a dialog whether it continues or stops.
Triggered rules
Every triggered 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.