The 2am AI bill: one infinite agent loop cost more than a year of office coffee

longtriproad · reddit · 2026-11-06

The author describes the "2am problem": a tool goes down, the agent doesn't know, so it retries in an infinite paid loop — potentially for six hours — until the provider's spend alert arrives, by which point the money is gone. One person reported a single bad night cost more than their office's yearly coffee budget.

The author built ACPPotamia, a proxy sitting between your agents and OpenAI/Anthropic: it checks each call's cost against a budget before it goes out and cuts off agents that are just repeating themselves. Setup is changing one URL in your existing SDK. The post also asks readers how their team first discovered runaway spend.

Original post →

More from coding & agent

coding & agent channel →