Agent stuck in a loop cost $12 overnight and nearly $1,200 — how do you build kill switches?

Full_Collar9026 · reddit · 2026-10-05

A developer recounts waking to a $12 bill on a zero-user project: an agent got stuck in a loop while the auto-scaler kept adding instances — left until 9 am it would have burned roughly $1,200 in LLM API tokens. Their only safeguard is an AWS budget alert triggering a Lambda that kills everything, and they're asking how others build kill switches for runaway agent loops, preferring an app crash over paying for a bot talking to itself all night.

Original post →

More from coding & agent

coding & agent channel →