How to Run a Blameless Postmortem (Even When Claude Wrote the Bug)

Fix the process, not the person or the tool.

There are times when a bug makes it all the way to production and the first question in the incident channel is "who merged this?" Lately the second question is "was this written by Claude?" Neither one helps you stop it from happening again.

A blameless postmortem is a short write-up after an incident that looks at what happened and why the system allowed it, instead of who to blame. The idea is simple: people (and Claude) will always make mistakes, so the useful question is why the mistake wasn't caught, and what can we do going forward to prevent events like this?

TL;DR Write down the timeline, the impact and the contributing factors, then turn each fix into a ticket in the current sprint. "Claude did it" is never the root cause.

An example incident

Say you work on a trading app. Traders fill in an order ticket (symbol, buy or sell, quantity) and submit it, and the order is posted to a ledger. A developer asked Claude to replace every plain <button> in the app with the shared Button component. Claude opened a PR that touched 38 files. Most of the changes looked like this:

// before
<button type="submit" className="btn-primary">
Submit order
</button>
// after
<Button variant="primary">Submit order</Button>

The shared component looked like this:

// components/ui/Button.tsx
export function Button({ type = "button", ...props }) {
return <button type={type} {...props} />
}

In hindsight the bug is obvious: type="submit" wasn't carried over, so "Submit order" fell back to type="button" and stopped submitting the order ticket.

CI passed. The unit test for the order ticket called the submit handler directly instead of clicking the button. A reviewer approved the PR after skimming it, since 38 files of the same mechanical swap is hard to read carefully. It went out on a Tuesday afternoon during market hours, and no orders reached the ledger for almost an hour before it was rolled back.

Start with a timeline

Write down what happened in order, with times. Stick to facts, so everyone agrees on what happened before you talk about causes:

13:40 PR #812 "Use shared Button everywhere" merged
13:52 Deploy to production finishes, smoke tests pass
14:05 Trading desk reports: "Submit order does nothing"
14:31 Desk escalates to the on-call developer
14:38 Cause found in the order ticket form
14:42 Revert of #812 merged and deployed
14:46 Test order posted to the ledger, incident closed

Describe the impact

Who was affected and how much? Keep it concrete: "No orders could be posted to the ledger from 13:52 to 14:46 (54 minutes), during market hours. Around 300 order submissions failed, and traders had to re-enter them after the fix." Numbers help people take the action items seriously later.

Find the contributing factors

This is where blameless matters most. It's easy to write "Claude removed type="submit"" and stop there. The real question is why nothing caught it:

  • Why did the tests pass? The order ticket test never clicked the actual button.
  • Why did review miss it? A 38-file PR of near-identical changes, with no request to check the forms by hand.
  • Why didn't the smoke tests catch it? They checked that the trading page loads, not that an order can be posted to the ledger.
  • Why did it take 40 minutes to notice? There's no alert when orders posted to the ledger drop to zero.

Every one of those would have been just as true if a person had written the change. That's how you know you've found the real causes.

Say "we", not "you"

Someone opened the PR and someone approved it, but they were following the process the team set up. If the process let this through, it's the team's problem, so write about it as one:

  • "We merged a large PR without testing the order ticket by hand."
  • "We didn't have an alert for orders dropping to zero."

Compare that to "Sam didn't test it." That describes a person, and it teaches everyone to hide their mistakes next time. The developer who merged the change is usually the one who knows the most about what happened, and you want them comfortable saying all of it.

Turn action items into tickets

Each contributing factor should lead to something you'll actually change. Write each one as a ticket and pull it into the current sprint. If it goes into the backlog, it'll still be sitting there at the next incident.

  • Change the order ticket test to click "Submit order" instead of calling the handler.
  • Add a smoke test that posts a test order to a sandbox ledger after every deploy.
  • Alert the on-call developer when no orders are posted to the ledger for 10 minutes during market hours.
  • Split large mechanical PRs up by area, with forms in their own PR.

Alerting should be part of every postmortem. Ask what number would have told you something was wrong, like orders going to zero, and make sure an alert fires when it does. An alert would have caught this one in 10 minutes instead of 40.

Add reporting and observability

The more data you have, the easier it is for Claude and other AI agents to read, review and understand what happened. Log the events that matter to the business, not just the errors:

// components/OrderTicketForm.tsx
function handleSubmit(event) {
event.preventDefault()
logger.info("order.submit", {
accountId: account.id,
symbol: order.symbol,
side: order.side,
quantity: order.quantity
})
postOrderToLedger(order)
}

If order.submit drops to zero a few minutes after a deploy while the market is open, that points straight at the change that just went out.

A wall of error text is hard for people to read, but for Claude it's a gold mine it can turn into a likely cause in minutes.

A wall of error text isn't very useful to a person. It's hard to read and harder to make sense of under pressure. For an AI agent it's a gold mine. Claude can go through thousands of log lines, line them up with what merged and come back with a likely cause in a few minutes. Connecting Claude to tools like Datadog and Slack gives you a quick feedback loop: a change merges, something looks off in the logs, and you hear about it in the team channel before a trader calls the desk.

A postmortem template

Here's the template I use. Copy it into a doc and fill it in within a few days of the incident, while everyone still remembers the details:

# Postmortem: [short title]
Date of incident:
Author:
Status: Draft | In review | Done
## Summary
Two or three sentences. What broke, for how long, and how it was fixed.
## Impact
Who was affected, how many, and for how long.
## Timeline
HH:MM What happened (times in one time zone)
## Contributing factors
- Why wasn't it caught by tests?
- Why wasn't it caught in review?
- Why wasn't it caught after deploy?
- Why did it take as long as it did to notice and fix?
## What went well
Things that helped, so we keep doing them.
## Tests to add or update
Which tests would have caught this? Which ones need to change?
## Reporting and observability
What should we log, measure or alert on so we see this sooner next time?
## Action items
- [ ] Ticket: what will change (pulled into the current sprint)

Run the meeting in 30 minutes, share the doc with the whole team and check the tickets at your next retro. The goal is to prevent bugs without blaming anyone, and to keep updating our process so there are fewer of them going forward.

Have some feedback on this post? .