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.

EngineHow usage is measured
Claude CodeLive, with every model message
CodexAt the end of each turn
Text-mode CLIsNot 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

BudgetMeaning
Token Guardian activeTurns enforcement on or off
Claude Code · daily budgetTokens per calendar day, measured live. Default: 5 million
Codex · daily budgetTokens 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:

RuleFires whenDefault
Repeated failureThe same command fails with identical output this many times3
Token spikeA run uses more tokens per minute than this250,000
Output floodA run writes more output within two minutes than this20 MB
StallNeither output nor file changes for this long900 s
Repeated command / No progressThe same action repeats without moving forward—
Budget reachedA daily or task budget is exceeded—

What happens when a rule fires

You choose separately for two kinds of runs:

RunsExamplesDefault
UnattendedOvernight Autopilot, routinesStop
AttendedPoint & Fix, chatsPause & 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.

Something unclear or missing? Tell us — we improve these pages every week.