Set the spend limit before the first prompt
I opened a usage dashboard on a Thursday and found a number with one too many digits in it. Sixty dollars, quietly spent by an agent I’d left grinding on premium models while I got on with something else. The code it produced was fine. The bill was not something I remember agreeing to.
The worst offender was Gemini running inside Cursor. Every follow-up question re-read the whole prior context, and I watched cache reads climb to something like a hundred times the input tokens. Usage-based pricing doesn’t warn you before it does that. It just quietly adds up in the background while the work looks like it’s going well.
That burn taught me two things I now treat as rules. First, the moment I set up any new API key, I give it a hard spending cap before I write a single prompt. Second, for anything I’m hitting heavily, a flat subscription tends to work out roughly twenty times cheaper than paying per token, so I default to the plan and only reach for raw API access when I actually need it.
None of this is me being cheap. I just hate opening a dashboard and finding a number I didn’t authorise. I still let agents run for a long time. I just make sure the meter has a ceiling on it first. The longer version, with the actual invoices, is over at Codewalkers.