Skip to content

Runtime supervisor

A long-running monitor process — distinct from a hook — that watches a Claude Code session for token-budget exhaustion, oscillation hashes, and plan drift, with the authority to inject a Stop event.

Hooks fire on tool events; the runtime supervisor runs continuously beside the session. It tracks token spend against a budget, watches for repeated oscillation hashes from the detector hook, and compares the live plan against the planning-pass output to detect drift. When any threshold is breached, the supervisor injects a Stop event into the session — escalating to a human rather than letting the agent silently burn through budget.

Placeholder body. Replace with the full glossary entry per playbook §9. Include a sequence diagram of supervisor → hook → session interaction.

When to use

  • Any unattended agent session — overnight runs, scheduled migrations, CI-triggered work.
  • Solutions large enough that a single bad plan step can consume an hour of token budget before a human notices.

Distinguish from

A hook fires inside a single tool event. A supervisor watches across events, holds long-lived state (token totals, hash windows), and can act when no tool event is firing — for instance, when the agent is mid-thinking.

Related terms