Cap spending before leaving an agent unattended
An agent looped while he showered and spent over $2,000 · Reddit r/cursor · u/samandeg · Apr 2026
What happened
Left alone on a hard bug, an agent repeated the same steps for nearly two hours. The poster says no refund was given.
The honest numbers
- Says over $2,000 spent in under two hours
As stated by the source. Not independently verified.
The lesson
Don't leave agents running unattended without a spending cap, and check on long runs every few minutes.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I'm stuck in a loop where Cursor fixes one thing and breaks another. Stop editing code. 1) Summarise what I asked for, what changed in the last few attempts and what's broken now. 2) List 3 possible root causes, ranked, and what evidence would confirm each. 3) Tell me how to restore the last working version (checkpoint, restore button or git) before we try again. 4) Propose ONE small change, list the exact files you'll touch, and the features I should re-test afterwards. Here is the exact error message / what I see: [paste the error, with any keys removed]. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: fix loops & regressions
When an AI tool fails to fix a bug two or three times, more prompts in the same chat often make it worse: the model keeps guessing, changes unrelated files and loses track of the last working state.
A quick checklist before you ship
- Stop after two or three failed attempts and restore the last working commit.
- Start a fresh chat and paste the exact error message and the file involved.
- Ask for one small change at a time, and test it before the next request.
- Ask the AI to explain the cause before it writes any fix.
More on this: every fix loops & regressions story and our related guide.
Tools involved
Cursor stories, Gemini stories
Related stories
- Stop an agent from rewriting working auth code
A morning spent stopping an agent from rewriting auth middleware - Before you open a repo you didn't write in an AI coding tool, read its AGENTS.md, CLAUDE.md, .claude/, .cursor/, .mcp.json and .vscode/tasks.json, and never let the agent run a script it is told not to inspect
Bitdefender: poisoned GitHub repos tell Claude Code, Cursor and Copilot to run a hidden credential stealer - Protect the AI tool tokens saved on your laptop
Aoki infostealer now steals Claude, Codex, Cursor and Copilot credentials
Source: original post on Reddit r/cursor ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.