DEV Community

Cover image for An AI Agent Canceled Every Stripe Subscription in 7 Seconds. The Model Isn't the Problem.
Vladyslav Donchenko
Vladyslav Donchenko

Posted on • Originally published at vsebude.it

An AI Agent Canceled Every Stripe Subscription in 7 Seconds. The Model Isn't the Problem.

An AI agent wiped a founder's entire MRR while they slept. The viral post blamed the model. The real lesson is about architecture.

Last week, @bridgemindai woke up to find their MRR had collapsed to $38. A cron job written by GPT-5.6-Sol (Codex) had canceled every active Stripe subscription in 7 seconds. No customers had left. The code just ran.

The take that went viral: "GPT 5.6 cannot be trusted. Fable 5 has never done this to me."

That framing will get you burned by whichever model you switch to next.

What Actually Happened

The bug: a cron job that treated an empty deletion queue as input to process everything. Empty queue → delete all. This is a logic error developers have been writing since the 1980s. The AI generating the code is almost irrelevant to the root cause.

What matters: that code had unguarded access to a live production Stripe API key, was scheduled to run autonomously, and had no human checkpoint between "AI generated this" and "this ran on your entire customer base."

The Real Failure: No Safety Rails on Destructive Operations

Three questions every agentic pipeline touching production must answer:

  1. What operations are irreversible? Canceling subscriptions, deleting records, sending emails — these need different treatment than reads.
  2. What credentials does the agent hold? A Stripe key that can cancel subscriptions should never be handed directly to an autonomous agent. Scoped, restricted keys exist for this.
  3. What's the human checkpoint before destructive actions execute? "The code looked right when I reviewed it" is not a checkpoint.

Three Rails That Would Have Stopped This

Dry-run gates with non-empty checks. Before deleting or canceling, log what would be affected. If the target set is empty or unexpectedly large — abort, alert, never proceed. Two lines of code.

Scoped credentials, not production keys. AI agents get minimum Stripe permissions. Read-only by default. Write access requires explicit escalation. Stripe restricted keys exist for this.

Human-in-the-loop for irreversible ops. A Slack message: "I'm about to cancel 47 subscriptions. Confirm?" Three seconds to respond. Costs nothing. Makes autonomous agents safe to run while you sleep.

Why Model-Blaming Is a Trap

Every current AI model can write a cron job with a logic error. The rate varies. The risk doesn't disappear. Matt Shumer posted the same day that GPT-5.6-Sol deleted almost all his Mac's files — same pattern, different product, same missing rails.

The common thread isn't the model. It's the architecture.

Production agentic pipeline checklist:

  • Classify every operation: read / write-reversible / write-irreversible
  • Require explicit human approval for all write-irreversible operations
  • Scope credentials to minimum necessary permission level
  • Gate deletion loops on non-empty, size-bounded target sets
  • Run in sandbox with production-mirrored data first
  • Log everything the agent plans to do, in plain language, before execution

Build the rails before you run the agent — not after you wake up to an empty dashboard.

Originally published at vsebude.it

Top comments (0)