Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

RunVouch: Cost‑Cap Watchdog for Autonomous Claude Code Agents

Description and use

RunVouch provides cost control and loop detection for autonomous Claude Code agents, preventing unexpected bills and delivering instant alerts.

Problem

Unattended AI agents can run in infinite loops, generating thousands of API calls that accumulate high costs before any alert is triggered.

Outcome

With RunVouch, the author prevented $1,818 and $6,000 runaway bills, caught retry storms within minutes, and gained real‑time cost visibility, reducing unexpected expenses to a few dollars per run.

Workflow

  • Register agent with cadence, per‑run cap, and evidence requirement using rv agent nightly-review --cadence 24h --cap-run-cost 2 --evidence
  • Wrap the actual Claude Code command with rv run nightly-review --evidence-file out.html -- -- claude -p "Review yesterday's PRs and write the summary to out.html" --output-format json
  • RunVouch streams heartbeats, tracks token usage, and enforces cost caps in real time
  • When a cap is exceeded, RunVouch triggers BUDGET_RUN or BUDGET_DAY alerts and can pause the agent
  • If a tool is called with identical input ≥8 times, RETRY_STORM alert fires
  • DRIFT alerts detect abnormal duration or output size deviations

Evidence

Four documented runaway agent bills ($1,818, $6,000, $437, $150)

Source

RunVouch opens the run, streams the heartbeat, and closes it with the exit code and whatever evidence file you point it at

Source

  • Record date: 2026-09-07T04:37:11.197Z