Bourne Forge AI
← Notes
OperationsAI

AI Incident Response and Postmortems

How to investigate failures when the service remained online but produced harmful or incorrect results.

By Mark Bourne

Introduction

Change Management for AI Systems was about shipping changes safely. This closing article is about what happens when, despite all of that discipline, something still goes wrong—because it will.

Traditional incident response was built around outages: a service went down, and the timeline started when it did. AI incidents rarely announce themselves that way. Defining Reliability for AI Systems opened this series with exactly that problem: available, fluent and wrong looks identical to success on every dashboard that doesn't know to look deeper.

The uptime chart says the service never went down. Someone still needs to explain why it gave a customer the wrong answer for six days.

This article covers what counts as an AI incident, how to investigate one when nothing crashed, and how to turn it into a corrective action instead of a story people tell quietly for a year.

The Internet Lesson: The Postmortem Made the Next Outage Rarer

Network operations built an entire discipline around the postmortem: a structured, blameless account of what happened, why, and what changes as a result. Not a performance review. Not a search for who to blame. A record that made the same outage measurably less likely to happen again.

That discipline earned its place the hard way—organisations that skipped it kept re-learning the same lessons through repeat incidents, while organisations that wrote things down and fixed root causes saw genuinely fewer recurrences over time.

AI systems fail in newer, stranger ways. The discipline that makes failure productive is not new at all.

What Qualifies as an AI Incident

An incident definition built only around downtime misses most of what actually goes wrong in an AI system. A broader, more honest definition includes:

  • Confidently incorrect output reaching users, regardless of uptime
  • An error budget (from your reliability targets) exhausted early
  • A security event: injection, unauthorised tool execution, data leakage
  • Retrieval or context failures producing systematically wrong answers
  • A quality metric crossing a defined threshold, even without a single user complaint

The error budgets introduced in Defining Reliability for AI Systems give this definition a number instead of a feeling: an incident is, in part, whatever burns the budget faster than expected.

Incorrect Versus Unsafe Output

Not every bad output deserves the same response speed. A wrong answer to a factual question is a quality incident—serious, worth fixing, rarely urgent within minutes. Unsafe output—something that could cause real harm, leak sensitive data, or take an irreversible action—needs an immediate response, closer to a security incident than a quality bug.

Triage on consequence, not on how the failure happened to be produced.

A Realistic Incident, Worked Through

A coding assistant with write access to a repository processes a GitHub issue containing hidden instructions—the indirect prompt injection pattern covered in Securing Tool-Using AI Systems. It pushes an unauthorised commit modifying a configuration file.

Here is how the response actually unfolds, step by step:

  • Detection: the audit log flags a commit outside the assistant's normal pattern
  • Containment: the tested kill switch revokes the assistant's repository credentials immediately
  • Evidence preservation: the full trace — issue content, model reasoning, tool call — is pulled before logs roll off retention
  • Timeline reconstruction: the trace ID connects the malicious issue directly to the resulting commit
  • Root cause: the tool lacked a check separating retrieved issue content from actionable instructions
  • Corrective action: that check is added, and the exact issue text becomes a permanent test case

Every step in that sequence traces back to a control described earlier in this series. None of it was improvised in the moment.

Retrieval Failures as an Incident Category

Context Architecture covered stale and conflicting sources at length. When that failure reaches users at scale—a superseded policy cited repeatedly, a wrong document ranking consistently higher—it deserves the same investigation rigour as any other incident, even though nothing about the request-handling path ever errored.

Security Incidents and Unexpected Tool Execution

Any incident involving a tool doing something it wasn't meant to do—the excessive agency problem from Securing Tool-Using AI Systems—should route through security incident response, not general quality triage. The investigation questions are different: not “was the answer good,” but “what could have been done with this access, and was it?”

Evidence Preservation

Logs roll off retention. Caches evict. If evidence isn't captured quickly, the investigation loses exactly the detail that would have explained what happened.

  • Snapshot the full trace — prompt, retrieved context, model output, tool calls — the moment an incident is identified
  • Preserve the exact prompt and model version in effect at the time, per the versioning discipline in Change Management
  • Respect the privacy-aware logging boundaries from Observability even while preserving evidence — don't widen access under incident pressure

Timeline Reconstruction

The distributed tracing described in Observability for Non-Deterministic Systems is what makes timeline reconstruction possible at all. Without a trace ID connecting retrieval, model calls, and tool execution, reconstructing “what actually happened, in order” becomes guesswork stitched together from disconnected logs.

Containment

Containment stops an incident from getting worse while root cause is still being understood. For AI systems, the toolkit is largely what earlier articles already built:

  • A tested kill switch to revoke credentials or tool access instantly
  • A circuit breaker or reduced-capability mode to keep serving safely while investigating
  • The rollback procedure from Change Management, if a recent change is the suspected cause

Containment that only exists in a design document is not containment. It has to have been exercised before the day it's needed for real.

User Notification

Deciding whether and how to notify affected users is a judgement call, but it shouldn't be made from scratch during every incident.

  • Define notification thresholds in advance: what severity or scope triggers user communication
  • Be specific about what was affected and what was done about it — vague reassurance erodes trust faster than an honest account
  • Notify sooner rather than later; the delay itself often becomes part of the story

Root-Cause Analysis

“The model hallucinated” is a symptom description, not a root cause. Real root-cause analysis for AI incidents usually lands on one of the concrete, addressable failures this series has covered: missing or stale context, an unreviewed model upgrade, an over-permissioned tool, a retrieval index that never expired a superseded document.

The reproducibility built in Change Management is what turns root-cause analysis from speculation into verification: reproduce the exact conditions, confirm the cause, then confirm the fix actually resolves it.

Corrective Actions That Actually Stick

A corrective action that isn't enforced mechanically tends to quietly lapse.

  • Turn the failing case into a permanent golden test case, so a regression can't ship unnoticed
  • Assign an owner and a date to every corrective action, not just a description
  • Feed the incident into the relevant SLI or error budget so its cost is visible going forward

Blameless Postmortems

AI incidents invite a particular kind of unhelpful blame: either the engineer who wrote a prompt gets scapegoated for something genuinely unpredictable, or “the AI did something weird” becomes the entire explanation and the investigation stops there. Both dodge the actual, fixable systemic cause.

A blameless postmortem asks what about the system allowed this to happen, and what changes reduce the chance of it happening again—not who to hold responsible.

SectionPurpose
TimelineWhat happened, in what order, reconstructed from traces and logs
ImpactWho and what was affected, and for how long
DetectionHow the incident was found, and how long that took
ContainmentWhat stopped it from getting worse, and how quickly
Root causeThe specific, reproducible cause — not just the symptom
Corrective actionsWhat changes, with owners and dates, prevent a repeat
LessonsWhat this revealed about the system, stated without blame

Trade-offs and Anti-Patterns

  • Defining 'incident' only as downtime, missing every quality and security failure
  • Treating every bad output as equally urgent, or equally non-urgent
  • Preserving no evidence until it's already rolled off retention
  • A kill switch or rollback procedure that's never been tested before it's needed
  • Postmortems that name individuals instead of systemic causes
  • Corrective actions that describe intent without an owner, a date, or a test case

Final Thoughts

Internet Architecture Lessons for AI Systems opened this series by arguing that reliable systems come from architecture, not individual brilliance. Ten articles later, incident response is where that argument gets tested for real: not in a design document, but on the day something actually goes wrong.

An outage ends when the service comes back.

An incident ends when the system genuinely can't fail the same way twice.

That's the arc this series has followed—defining reliability, designing for failure, seeing clearly, supplying trustworthy context, containing what a model can do, staying portable, involving people deliberately, managing cost, controlling change, and finally, learning properly from what still goes wrong. None of it makes failure impossible. All of it makes failure survivable, and rarer over time.

A Practical Checklist

Before the next incident happens, work through these questions:

  1. 1Do you have a written definition of what qualifies as an AI incident, beyond downtime?
  2. 2Can you reconstruct a full timeline from traces and versioned prompts/models, not memory?
  3. 3Is there a tested containment action (kill switch, circuit breaker, reduced-capability mode) ready before it's needed?
  4. 4Is there a decision framework for when and how affected users get notified?
  5. 5Does root-cause analysis end in a reproducible cause, not just 'the model did something odd'?
  6. 6Does every corrective action become a golden test case, so the failure can't silently recur?
  7. 7Are postmortems blameless in practice, not just in name?
  8. 8Is there a standing home for postmortems that the whole team actually reads?

About This Series

This article closes the AI Infrastructure & Architecture series on Bourne Forge AI, which began with Internet Architecture Lessons for AI Systems and worked through reliability, failure design, observability, context, security, portability, human review, cost, and change management along the way. Rather than focusing only on prompts or models, the series has tried to treat AI applications as what they are: production systems, built on engineering disciplines that Internet infrastructure spent decades earning the hard way.

More from the Notes

Short technical notes and observations, written up as experiments produce something worth documenting.

Back to Notes

Was this useful?

…

Published