AI Joe
← Blog· Engineering Reality

AI Writes for One Record. Production Sends Fifty Thousand.

October 17, 2026

Why it matters: AI-generated code often ships clean and tested, then fails at 3 a.m. because nobody told it, or asked it, what happens at real volume.

The Details:

  • Developers prompt with a single example: one invoice, one webhook, one row. The model pattern-matches to that example and writes code optimized for exactly one case. The scale a developer has in mind never gets typed into the prompt, so the AI cannot build for it.
  • The first test is almost always the happy path. Writing a test with thousands of records, a few malformed, one duplicate key, one timeout, is tedious, so it gets skipped. Without that test, neither the developer nor the model gets feedback that the design breaks under load.
  • Polished output removes the usual warning signs. A junior engineer's rough prototype invites questions; fluent, well-named AI code does not. Reviewers stop probing because nothing in the output signals that scale was never considered, so a first draft gets treated as production ready.
  • Partial failure gets decided by accident instead of on purpose. When record four thousand of ten thousand fails, the code needs to answer whether it aborts, skips, retries, or leaves broken state behind. If that answer is not specified upfront, the system picks the worst option at the worst time, and idempotency becomes a postmortem topic instead of a requirement.

The fix starts before any code gets written. State expected volume, error rate, and failure behavior as part of the request. Make the stress test the second test written, right after the happy path, not the tenth. And ask directly how the code behaves at a hundred thousand calls with a five percent error rate, because AI assistants can reason about that scenario well when prompted, they just never volunteer it.

Bottom Line: The model can write the function; only the developer can decide what conditions it actually has to survive.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.