AI coding tools are getting good at code that passes tests. They're less good at code that survives production. These are the three failure patterns I'd plan for, using an order-processing service on Kubernetes as the example:
1. The new version gets OOMKilled
Generated code often holds more in memory than it looks like it should: loading full collections, caching without bounds, buffering whole responses. It passes every test, then the pod dies under real load.
- Catch it: alert on container restarts with termination reason OOMKilled, and compare memory per request between versions during rollout, not just after.
- Prevent it: put "bounded memory on any path that scales with input" in your coding standards and your review checklist.
2. Every dashboard is green while orders fail
CPU, memory and pod health all look fine, because the service is up. It's just returning errors, or silently dropping work.
- Catch it: an SLI on the business outcome (successful orders per minute, or order success rate), not only infrastructure health. Alert on the outcome.
- Prevent it: require structured logs for success and failure in the spec, so the outcome is measurable from day one.
3. A database failure cascades through everything
One slow dependency, no timeouts, aggressive retries, and every caller ends up blocked waiting on it.
- Catch it: latency and saturation alerts on the dependency, plus error-rate alerts on its callers.
- Prevent it: timeouts on every external call, retries with backoff and jitter, circuit breakers, and failing fast instead of queuing forever.
The agent question
If you use an AI agent for incident response (Azure SRE Agent, in this case), decide in advance what it may do alone. A reasonable rule: actions that are reversible, bounded and well understood (restart, scale out within limits) can be automated. Anything that changes code, config or data needs a human. Budget the agent's cost per incident too.
Which of these have you seen most from AI-assisted changes?
(Disclosure: I work with Build with AI by Packt, which runs a hands-on workshop where Microsoft architect Albert Tanure breaks a service exactly these three ways and traces each failure with Azure SRE Agent. Details in the comments.)