← Blog

Incident Response Plan When an Agent Shipped the Change

Marco Masut

An incident response plan is a documented procedure that says who detects, contains, fixes and reports an incident, and in which order. When an AI agent wrote and shipped the change that caused the incident, the plan keeps the same phases but needs one more capability: reconstructing the change quickly. The first question after an outage or a leak is rarely "what failed" alone. It is "which change was this, what was it supposed to do, what was checked before it went out, and who approved it". If the answers live in a closed chat session, the team loses hours it does not have. A plan for agent-made changes therefore links every release to its request, its task, its stored checks and the named person who signed. The sections below cover the questions a plan must answer, how to reconstruct the change, how to roll back, and what to rehearse.

What does an incident response plan have to answer?

It has to answer a short list of questions, in the same order, under pressure. The classic lifecycle in NIST SP 800-61 Rev. 2 groups the work into preparation, detection and analysis, containment, eradication and recovery, and lessons learned. Whatever version of the model a team follows, the plan is only as good as the answers it can produce fast:

| Question | What the plan must name | | --- | --- | | Who declares an incident and who leads it? | A named role, with a deputy | | What counts as severity high? | Written thresholds, not judgment on the night | | Who may stop a release or roll one back? | Named roles with the access to do it | | Who talks to the customer and the regulator? | One owner for each, with deadlines | | Which change introduced the problem? | A way to trace the production state to a commit and a request |

The last row is the one agent-written delivery stresses most. Everything else in the plan is unchanged.

What is the new first question: which change, and whose signature?

After containment, every review asks the same thing: who approved this? With human-written code the answer sits in a pull request, a ticket and someone's memory. With an agent, the author cannot be interviewed and the session that decided may be gone. The plan must therefore treat the approval record as an input to the incident, not as an afterthought.

Concretely, the on-call person should be able to find, from the production commit alone:

  1. the request as the customer or product owner wrote it;
  2. the plan that was approved and the person who approved it;
  3. the task that produced the change and the files it was allowed to touch;
  4. the checks that ran on the committed state, with their results;
  5. the signature on the delivery, tied to that exact commit.

This does not assign blame. It tells the team whether the failure was in the request, in the checks, in the scope, or in the decision to ship, which are four different fixes. The same record underpins an audit trail for agent-made changes.

How do you reconstruct a change an agent made?

Work backwards from the commit, not from the conversation. A chat transcript is long, unstructured and often unavailable. The durable records are the ones the system wrote down while working: the task list, the verify command of each task, the stored results, the diff against the allowed scope and the signed approvals.

A practical reconstruction runs in this order:

  • identify the commit that is live and the release that carried it;
  • open the task that produced it and read its objective and its verify command;
  • compare the files touched with the scope that was allowed;
  • check whether the verify result was green on the committed state, and whether any check was suppressed or skipped;
  • read what the signer was shown at approval, including the choices the agent made on its own;
  • decide whether the gap was in the request, the test, the scope or the review.

If a step cannot be done because the record does not exist, that is the first finding of the post-incident review. It is also the cheapest thing to fix before the next incident, and it connects to the broader change control process for AI-generated changes.

How do rollback, containment and the evidence trail fit together?

Containment and evidence pull in opposite directions: you want to remove the bad change now, and you want to keep everything that explains it. A plan should say how to do both.

  • Roll back by reverting to the last signed delivery, not by asking an agent to patch forward during the incident. A fast fix written under pressure by the same process that caused the problem needs its own scrutiny.
  • Freeze the record before changing anything: the commit, the task state, the stored check results and the approvals. Copy them out of the working system.
  • Keep new agent work paused on the affected area until the cause is understood, unless the fix goes through the same plan, checks and signature as any other change.
  • Log who did what during the incident, including any manual change to production. An emergency change is still a change.
  • Note which controls were bypassed during the response, and put them back on the list for review.

An emergency path is legitimate. An emergency path with no record is how the next incident gets harder to explain. For the upstream side of the same problem, see AI risk assessment for software delivery.

What should you rehearse before the first incident?

Rehearse the reconstruction, not only the escalation. Most teams practice who to call. Few practice finding out, within an hour, why a given change was in production. A short exercise is enough:

  1. Pick a delivered change from last month, chosen by someone else.
  2. Ask the on-call person to answer the five questions above using only the stored records.
  3. Time it, and write down every step that needed a person's memory or a chat log.
  4. Fix the records, not the person: add the missing link between commit, task, check and signature.
  5. Repeat after the next release.

Also rehearse a rollback to the last signed delivery, and confirm the people named in the plan still have the access they need. Detent, the end-to-end delivery system (detent-ai.com), is built so that this record exists by default: the plan and the delivery are signed by a person, and each task keeps its checks and results. For the wider picture, see AI software development.