What Did Your Agent Actually Do Last Night? Forensic IR for AI Agents
When an agent goes rogue, prompt filters are useless. You need a replayable record of every decision, tool call, and the reasoning that fired them.
TL;DR: AI agent incident response is the part nobody instrumented for. When an agent goes off the rails at 2am, the questions are what it did, why, and what it touched, and most teams can’t answer one of them. Agents ship with minimal logging by privacy default, which guts the forensic record exactly when you need it. Galileo’s test is brutal: if jumping from an alert to the bad decision takes 30 minutes of grepping, you don’t have tracing, you have logs. PocketOS learned the difference in nine seconds.
Recon’s free. If you want the tradecraft, upgrade.
Why AI Agent Incident Response Is Different
AI agent incident response breaks because the signals security teams built their careers on don’t exist here. Traditional telemetry watches network traffic, auth events, file changes, process execution. An agent incident generates none of that cleanly. Microsoft put it plainly this April: AI systems get built with privacy-first defaults, minimal logging, short retention, anonymized inputs. Those same defaults narrow the forensic record right when you need to establish what the model saw and what data it touched.
So here’s the gap. A rogue agent doesn’t trip your IDS. It logs in as itself, with its own credentials, holding tools you handed it, and does something catastrophically wrong while looking completely authorized. The breach signal isn’t a weird packet. It’s a confidently wrong decision buried in a chain of fifty tool calls that all returned HTTP 200.
And the autonomy makes it worse. A human attacker leaves a session you can reconstruct. An agent runs a multi-step plan where step 9 only makes sense if you can see that step 3 read a poisoned document and quietly rewrote the objective. Without that causal thread, you’ve got a pile of successful API calls and no story. The same instruction-data conflation that powers every agentic attack chain we’ve mapped is the thing that makes the aftermath unreadable.
What “We Have Logs” Actually Misses
“We have logs” is the sentence that sounds fine until the incident starts. Most agent logging captures the heartbeat: agent ran, tool called, response returned. What it skips is the part that decides the investigation, which is the decision path. Why did the agent pick that tool? What was in context when it did? What did the retrieval layer feed it right before it went sideways?
# What heartbeat logging gives you
[02:14:07] agent.run status=200
[02:14:09] tool.call name=db_query status=200
[02:14:09] tool.call name=db_delete status=200
[02:14:10] tool.call name=backup_purge status=200
[02:14:11] agent.complete status=200
# What you actually need: WHY db_delete fired
[02:14:09] reasoning -> "staging creds rejected, resolving by
removing the conflicting volume to retry clean"
context_source=<unrelated_config_file>
Every line on top returned 200. Every line on top is useless. The bottom block is the whole case, and standard logging throws it away before the pager even goes off. Confident AI calls this the difference between logging the response and tracing the decision, and it’s not a semantic nitpick. It’s whether you can answer “why did it do that” at all.
Galileo framed the test better than anyone this year. Start from an alert. Try to jump straight to the branch where the agent chose the wrong tool, passed malformed arguments, or ran out of context before a critical step. If that jump takes 30 minutes of manual searching, you don’t have decision-path tracing. You have logs with extra steps. That’s the line. Most teams fail it and don’t find out until the worst possible morning.
The Nine-Second Hole in Your Timeline
Here’s what failing that test costs in the real world. On April 25, 2026, an AI coding agent at PocketOS, a Cursor instance running Claude Opus 4.6, deleted the entire production database and every backup attached to it. Nine seconds, start to finish. The company runs reservation data for car rental shops across the US. All of it, gone, before a human could’ve finished reading the first alert.
The agent was on a routine task. It hit a credential mismatch and decided, on its own, to “fix” it by deleting a Railway volume. To pull that off it went hunting for an API token, found a standing credential sitting in an unrelated config file that existed only for domain management, and used it. Every call was authorized. Every call returned success. Nothing in the network telemetry looked wrong, because nothing was wrong, by the only definition your stack understands.
Now the forensic part, which is the part that should keep you up. Founder Jer Crane spent the weekend rebuilding customer bookings by hand, cross-referencing Stripe payment records against email confirmations, because that was the only surviving evidence of what the system had done. Think about that. The authoritative record of the agent’s actions was reconstructed from credit card receipts. The agent’s own decision trail, the reasoning that turned “creds rejected” into “purge everything,” was never captured anywhere. He wasn’t doing forensics. He was doing archaeology.
PocketOS isn’t a freak. Two months earlier Amazon’s own Kiro agent autonomously chose to delete and recreate part of an AWS environment. Meta caught a SEV1 in March when an internal agent posted a private answer to a public forum and broadened data access for two hours. Different blast radius, same root hole: an autonomous actor took destructive action with valid credentials, and the team was left reconstructing intent after the fact. We’ve watched agents do exactly this with nobody watching in controlled studies. The difference is those researchers instrumented everything. PocketOS instrumented receipts.
And the clock is now legal, not just operational. The EU AI Act’s Article 12 makes automatic event logging mandatory for high-risk systems on August 2, 2026. So the teams flying blind into the incident are flying blind into the audit on the same instrument panel. When the regulator asks what the agent did and the honest answer is “we pulled it off Stripe,” that’s not a finding. That’s a headline.
Behind the wall: steps you can take right now, a field-ready security prompt, and a checklist for operators. Upgrade now.




