After the Agent Goes Wrong: What Incident Forensics Actually Needs From Your Audit Trail
7 min read Fullmakt Team
- agents
- traceability
- observability
- governance
- credentials
The postmortem meeting for an AI agent incident starts the same way every time: someone asks “what did it actually do?” and the room finds out that question is harder to answer than it should be. Not because nobody was logging anything — most teams running agentic AI in production have some logs — but because the logs answer “an API call happened” without answering the three things an incident review actually needs: what authorized it, what order it happened in relative to everything else the agent did, and how far the consequences spread before anyone noticed.
That gap is the difference between a fifteen-minute forensic review and a two-day archaeology dig through application logs, cloud provider audit trails, and whatever the agent framework happened to print to stdout.
Why “we have logs” isn’t the same as “we can reconstruct it”
A typical agent stack accumulates logs in layers that were never designed to be read together: the orchestration framework logs which tool it called, the API gateway logs the HTTP request, the cloud provider logs the underlying resource access, and the LLM provider — if you’re lucky — logs the prompt that led to the decision. Each layer is complete on its own terms and useless for reconstruction on its own, because none of them share a common identifier for “this was step 4 of task X, authorized under policy Y, because the agent decided step 3’s output meant it should.”
That’s the same layering problem six real incidents kept running into: the failure was rarely a single bad API call. It was a chain — a bad read, a bad decision built on that read, then a write that acted on the decision — and the chain is exactly what gets lost when each hop logs to a different system with no shared thread tying them together. Observability and traceability aren’t the same capability: observability tells you the agent is alive and calling things; traceability is what lets you walk backward from “this record is wrong” to “here is the exact call, and the three calls before it, that produced it.”
The three questions a real forensic review has to answer fast
- What was this agent authorized to do at the moment it acted? Not what it’s authorized to do in general — a role that was correct at deploy time can have accumulated scope creep for months, so the review needs the policy and credential scope that applied to that specific call, not today’s.
- What sequence of calls led here? A write that looks wrong in isolation often makes complete sense as the fourth step of a chain that started with a poisoned or misread input three steps earlier. Without an ordered, linkable trail, the reviewer is left guessing which of a dozen candidate causes actually fired first.
- What else did this touch? The moment one bad decision is confirmed, the next question is always “did it do this anywhere else?” — the same credential or the same faulty judgment applied across every resource it had reach into, not just the one record that happened to surface the problem.
None of these are answerable from a log line that says agent-service called api.example.com/v1/update — 200 OK. They need identity, authorization
context, and ordering, captured at the moment the call happened — not
reconstructed afterward from whatever each layer happened to keep.
Delegation and fan-out make this worse, not better
The reconstruction problem compounds the moment more than one actor is involved. On-behalf-of delegation means a call in the log might be an agent acting for a user, or a sub-agent acting for a parent task, and the log line alone often can’t tell you which — which matters enormously when the review is trying to establish who, ultimately, is responsible for the action. Parallel sub-agent fan-out makes it worse again: ten branches calling the same API under the same shared identity in the same three-second window look, in a flat log, like one very busy caller — and the reviewer has no way to isolate which branch is the one that went wrong without a record that ties each call back to its specific fork.
The business case: forensics that don’t start from scratch every time
This is the argument for putting every agent call through a broker instead of trying to stitch reconstruction together after the fact from whatever each system happened to retain:
- A single, cryptographically chained audit trail records who acted, on whose behalf, under what policy decision, and with which credential reference — for every call, in one place, instead of scattered across a gateway, a cloud audit log, and an orchestration framework’s console output.
- Every entry carries the authorization that was actually in force at that moment, so a forensic review doesn’t have to guess whether today’s policy matches what applied when the incident happened — it reads what was true then, because that’s what got recorded then.
- Calls link to the chain they belong to, not just to a flat timestamp order, so “what led to this” is a query against the broker’s record of parent tasks and branches, not a manual correlation exercise across systems that were never meant to be joined.
- Blast-radius questions answer directly: because every call an agent or its credential made is in the same trail, “did it do this anywhere else” is a filter on that credential’s history, not a search across every system the agent might have touched.
The value isn’t just faster incident response, though that matters — it’s that the review can actually finish. A postmortem that ends in “we’re not sure exactly what order these happened in, but here’s our best guess” is a worse outcome than the incident itself, because it means the next incident will look exactly like this one. A broker that was already the chokepoint for every credentialed call an agent made turns that postmortem from a guess into a query.
FAQ
Isn’t more logging the same thing as better forensics? No. Volume doesn’t fix the problem — layered logs from tools that were never designed to be read together still leave a reviewer stitching identifiers by hand. What forensics needs is one trail with a shared identity, ordering, and authorization context across every hop, not more of the same disconnected records.
Does a login handshake like OAuth or an A2A handshake give you this? No — a handshake proves who the caller was at connection time. It says nothing about the sequence of decisions that followed, or which policy authorized each individual call inside that session.
How is this different from the observability-vs-traceability post you’ve written before? That post drew the distinction between “is the agent alive and calling things” and “can I walk the chain of custody backward.” This post is about what a live incident review actually needs from that traceability layer in the moment someone is trying to answer “what did it do” under time pressure.
Does this replace the kill switch? No — a kill switch stops the bleeding; forensics is what you do once it’s stopped, to find out how deep the wound went and make sure it doesn’t reopen the same way.
What’s the minimum an audit trail needs to support a real forensic review? Per-call identity (including on whose behalf), the policy decision that authorized it, a credential reference, and ordering that ties each call to the chain or branch it belongs to — captured at call time, not reconstructed afterward from logs that were never meant to answer this question.
The agents-gone-wrong incidents that actually cost teams time aren’t the ones with an obvious single bad call — those get caught fast. It’s the ones where the reconstruction itself takes longer than the fix, because the record of what happened was never built to be read as one story. Fix that before the next incident, not during it.