When your AI agent gets stuck in a loop, Budgethelm stops it
Install with one command. If an agent keeps failing or reruns the same command, Budgethelm stops it before it burns more tokens. That includes while you sleep, in claude -p and in scheduled jobs.
curl -fsSL https://agentops.agentops.workers.dev/install.sh | shirm https://agentops.agentops.workers.dev/install.ps1 | iexYour browser opens once: log in or sign up and click Authorize. Free, no credit card, and we never see your model API keys.
The same stuck agent, with and without Budgethelm
How we tested: the real CLI talks to a local fake model that returns the same error on every step, so the agent keeps retrying. We counted model calls until it stopped. No money spent. Run on a Mac in November 2026; Codex was also run on Windows.
| Tool | Without Budgethelm | With Budgethelm |
|---|---|---|
| Claude Code (claude -p) | 60 calls, until it hit --max-turns 60 | Stopped at call 6 |
| Codex (codex exec) | About 170 calls in 8 s | Stopped in 1.7 s |
| Gemini CLI (gemini -p) | 31 calls in 10 s | Stopped in 0.7 s |
| GitHub Copilot CLI (copilot -p) | 866 calls in 10 s | Stopped in 2.3 s |
When it stops an agent
- 8 failures in a row, or the same error 5 times (on the 3rd it first tells the agent to try something else)
- The same command run 10 times, or 25 failures or 500 tool calls since your last message
- Claude Code using more than 6× your usual tokens (and over 200k) in 5 minutes, based on your own last 14 days
Counters reset whenever you reply. The stop message includes a one-line pause command if you really want the agent to keep going (1 hour by default). Thresholds can be tuned or turned off. For tools whose hooks may not run, such as Codex, a background process reads the tool's own logs and stops it from there.
How it differs from Claude Code /usage
| Claude Code /usage | Budgethelm | |
|---|---|---|
| Which tools | Claude Code | Claude Code, Codex, Gemini CLI, Copilot CLI, Cline and more |
| Which computers | Local history on this one | Every computer you install it on, in one place |
| When an agent gets stuck | You look it up afterwards | It is stopped right then, with a desktop notification |
Scope of /usage per the Claude Code docs: figures come from local session history on that computer and do not include other devices. If you only use Claude Code on one computer, /usage may be all you need.
What it changes on your computer
- Files live in
~/.agentops(%USERPROFILE%\.agentopson Windows). Without Node 18+, it downloads the official portable Node there and checks its SHA-256. Your system Node and PATH are untouched. - Adds a guard hook and MCP config to the tools it finds, such as
~/.claude/settings.json,~/.codex/hooks.json,~/.cursor/hooks.jsonand~/.gemini/settings.json. Your existing settings are kept. - Starts at login: a LaunchAgent on macOS, a systemd user timer on Linux, Task Scheduler on Windows. No admin rights needed.
- It uploads only timestamps, tool, model, token counts and stop records (reason and count). Conversations, code and API keys stay on your computer. The config security scan sends only the issue type, file name and line number, never the key itself.
- To remove it: on a Mac, double-click "Budgethelm 解除安裝" in your personal Applications folder (
~/Applications; on older installs, use the file in that folder whose name contains "解除安裝"). On Linux, runsh ~/.agentops/uninstall.sh. On Windows, double-click%USERPROFILE%\.agentops\uninstall.cmd.
Also included once installed
- Spend: tokens, cost and error rate by project, agent and model, with a monthly budget reminder. How cost monitoring works
- Waste: repeated context, no prompt caching, overly long outputs, expensive models on simple tasks, and what a model switch would save each month. Claude Code savings
- Security: hidden instructions and hard-coded keys in AGENTS.md, CLAUDE.md and MCP configs. Security scan
- Model prices: no signup, 2,961 model prices sorted by monthly cost (tools in Traditional Chinese). Price comparison · Cost calculator
Plans
- Free (now): every feature, just sign up. Accounts stay free until paid plans launch.
- Pro: US$1.99/month (payments opening soon): for heavy individual users. Planned: more computers and longer usage history. Nothing is charged and no card is needed until payments open.
- Team (coming soon): for teams. Planned: shared projects and roles.
What Budgethelm does not do
- It does not proxy model calls or resell tokens. Your agents call models as they do today.
- It never gets your model API keys. AI tools connect to MCP with Budgethelm tokens you can revoke anytime.
- The breaker counts calls, failures and token rate, not dollars. It does not switch models for you; savings estimates are suggestions.
- No email or Slack alerts yet. A stop shows a desktop notification on that computer only.
FAQ
- Will it stop work I am actively doing?
- Counters reset every time you reply, so back-and-forth work rarely gets near a threshold. If it does stop something by mistake, the stop message has a one-line pause command (1 hour by default), and you can mark it as a false stop on the site so it is not counted in savings.
- Does Budgethelm cost anything?
- It is free right now: sign up and use it. Pro will be US$1.99/month and payments open soon; accounts stay free until then. Team pricing is not set yet. The model comparison and cost calculator need no account.
- I do not want to pipe curl into sh. Alternatives?
- Open install.sh and read it first: the whole script is wrapped in one function that runs at the end, so a dropped download never runs half a script. Or skip the install and use the MCP checkup: add Budgethelm to Claude Code, Cursor or Codex and ask your agent to run a Budgethelm checkup. Usage is uploaded only after you agree.
- Does Budgethelm sit between me and the model API?
- No. Budgethelm does not proxy model calls or resell tokens. It only receives usage records such as timestamps, models and token counts.
- Is the app available in English?
- This page is in English, but the app interface is currently in Traditional Chinese.