An agent with an uncapped API key retried a failing migration test all night and burned most of a month's budget
Last spring he gave an agent an API key with no cap on it. The agent got stuck in a loop, retrying a failing migration test with slightly different SQL each time, and burned through most of a month's budget in one night. Nothing malicious, just a loop with no exit. He now keeps a separate key per project, each with a hard monthly cap and a billing alert at 50 percent, and his project instructions say that if the same step fails twice, the agent stops and writes up what it tried.
How it works
- Give the agent an uncapped key
- A migration test fails
- The agent retries it all night with slightly different SQL
- Most of a monthly budget is gone by morning
Why it’s worth knowing
The loss was not one big expensive call. It was one cheap failure, retried all night.
Where it’s from
Summarized from a public post on reddit.com. See the original ↗