A model that writes a perfect parser can still write a payment retry that double-charges a customer, and the difference has nothing to do with model quality.
The Details:
Stateless code lives entirely inside its own boundaries: input in, output out, everything the model needs is visible on the page. Stateful code depends on what happened between calls, like a webhook delivered twice or a timeout that fired after a retry was already queued. If that history was never written down anywhere the model can read, no amount of reasoning recovers it, because the information simply does not exist in the transcript.
Three things routinely go unspecified and quietly decide the bug: what can arrive more than once, which system holds the single source of truth, and what a partial failure actually looks like. A job that finishes stage three, then fails to record that fact before crashing, leaves a real state, done but unrecorded, that isn't in the schema and therefore isn't in the model's picture of the world.
Boolean flags make this worse geometrically, not linearly. Four flags like is_started, is_uploaded, is_verified, and is_processed create sixteen combinations when only five were ever meant to be legal; the rest sit around as dormant bugs. Replacing them with a single enum or tagged union makes illegal combinations impossible to construct, but only after checking production data to see which flag combinations actually occur in the wild.
Better tooling will close part of this gap by feeding models live schemas, invariants, and traces from real incidents, so some of what looks like reasoning failure will fade as context improves. The specification problem will not fade the same way, because that knowledge sits in the heads of the engineers who lived through the outage that created the invariant in the first place.
Bottom Line: Writing your system's hidden states down for the model to see is the same discipline that would have made the system better without any AI involved.
Enjoy this article?
Listen to the Claude Code Conversations radio show or join the community.