Runaway Guard

Runaway guard: a hook that stops a live Claude Code or Codex session when the agent loops on the same tool call, keeps failing, or exceeds a dollar cap. Use when the user wants a spending cap, budget limit, or cost ceiling for interactive agent sessions (the built-in --max-budget-usd works only in print mode); wants to halt an agent that repeats the same command, is stuck in a loop, or runs up a bill unattended overnight; wants a circuit breaker for several failed tool calls in a row; or asks how much the current session has spent against its cap, why a call was blocked, or how to raise or reset the cap. Runs locally: reads the session transcripts before each tool call and sends nothing.

RyanAlberts Updated 9 repo stars
Autonomy × Recovery — every loop-owning project placed by designed autonomy regime and failure-recovery tier

File contents

RyanAlberts/best-of-Agent-Harnesses commit de1d5b6d1e

Frequently asked questions

npx get-skill add ryanalberts/runaway-guard