{"slug": "alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops", "title": "Alerts aren’t controls: soft warn / hard stop for Cursor and Claude Code loops", "summary": "A developer built LoopBudget, a tool that provides soft-warn and hard-stop controls for Cursor and Claude Code sessions, addressing the gap where alerts alone fail to prevent runaway AI agent costs. The tool attaches to session trails, evaluates spend against policies, and issues receipts, though hard stop currently blocks the next tool call rather than force-killing mid-edit.", "body_md": "If you run Cursor or Claude Code hard, you already know the shape of the bill:\n\nThe session feels cheap while you're in the loop.\n\nThe meter (or the invoice) shows up later.\n\nBy then the damage is done — or you're rate-limited mid-task with no useful receipt for finance.\n\nCloud FinOps solved a version of this years ago: budgets that only notify aren't a control plane. Agentic coding has the same gap. Autoscale had traffic as a natural ceiling. An agent spends on *intent*. There's no gentle slope — just a wall.\n\nI built [LoopBudget](https://loopbudget.com) for that surface: soft warn, hard stop, and a session receipt for Cursor and Claude Code.\n\nThis post is the honest version of what \"hard stop\" means in early access, how the sidecars/hooks fit, and what we're deliberately not claiming yet.\n\nVendor UIs optimize for account-level or period-level usage. That's fine for finance at month-end. It's the wrong resolution for a coding agent.\n\nWhile the loop is running you care about:\n\nWhat teams actually do today:\n\n`ccusage`\n\n-style)None of those are a live policy. An alert that fires after the spend already happened is still just an alert.\n\nLoopBudget attaches to the session trail and evaluates spend against a policy:\n\n| Mode | What happens |\n|---|---|\nSoft warn |\nCross the soft cap → warn on the receipt + alert members. Session keeps going. |\nHard stop |\nCross the hard cap → `stop` decision, alerts, session marked stopped in LoopBudget. |\n\n**Path A honesty:** in early access, hard stop is a **policy decision + receipt + alert**. It is *not* a guaranteed vendor SIGKILL. Cursor and Claude Code don't expose a perfect \"kill this agent now\" primitive to third parties the way people wish they did.\n\nSo when we say soft warn / hard stop, we mean:\n\nBlocking the *next* tool call after a turn completes — a real ceiling — is the next step. Soft warn exists so you can wind down before you need that.\n\nTwo connectors, same policy engine.\n\n**Cursor** — a sidecar watches session transcripts, estimates tokens from the trail, and ingests into LoopBudget. Decisions show in the dashboard. Cursor itself is not force-stopped by us today.\n\n**Claude Code** — a Stop-hook path sends deltas after a turn. Same ingest → same soft/hard evaluation → same receipt. Claude Code is not killed mid-loop unless you later add a blocking hook that checks LoopBudget first.\n\nPublic CLI (static binaries, no Node on the GA path):\n\n[github.com/LoopBudget/cli](https://github.com/LoopBudget/cli)\n\nEstimates can lag vendor invoices. We don't pretend to replace the cloud bill. We aim to make *mid-loop* visible and policy-shaped.\n\nSomeone on Product Hunt asked the right question:\n\nDoes the hard stop kill the run mid-edit, or wait for the current tool call so you don’t get a half-written file?\n\nToday we **don't** yank the vendor mid-tool-call. That means LoopBudget isn't the thing leaving a half-written file via a hard kill — because we aren't cutting the edit mid-flight.\n\nThe safer control plane looks like:\n\nThat's the design target. Shipping \"we killed your agent\" before we can do (2)–(3) cleanly would create worse outages than surprise spend.\n\nLoopBudget is invite-only early access:\n\nIf you're an eng lead (or power IC) watching AI tooling become a real cost line, I'd love feedback on where soft vs hard should trip for your team — and whether \"wait for current tool call, block the next\" matches how you already think about agent risk.\n\nAlerts aren't controls. Soft warn / hard stop is the missing primitive for coding-agent loops.", "url": "https://wpnews.pro/news/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops", "canonical_source": "https://dev.to/lucianlature/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops-2afc", "published_at": "2026-07-28 14:21:21+00:00", "updated_at": "2026-07-28 14:36:02.551886+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-infrastructure"], "entities": ["LoopBudget", "Cursor", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops", "markdown": "https://wpnews.pro/news/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops.md", "text": "https://wpnews.pro/news/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops.txt", "jsonld": "https://wpnews.pro/news/alerts-arent-controls-soft-warn-hard-stop-for-cursor-and-claude-code-loops.jsonld"}}