Devops PROMPT
Agent Failure Post-Mortem
July 26, 2026Optimized for: anyDebugging agent failures
An agent run failed. Diagnose it properly rather than guessing. Work through, in order: 1. WHERE IT WENT WRONG: the first turn where the agent's state diverged from correct. Not where it crashed, where it started being wrong. 2. CLASSIFY THE FAILURE: - Goal drift (lost track of the objective) - Context loss (needed information had fallen out of the window) - Tool misuse (wrong tool, or right tool wrong arguments) - Bad tool output handling (misread a result) - Hallucinated state (believed something it never verified) - Loop (repeating without progress) - Genuine capability limit 3. ROOT CAUSE: harness, prompt, tool design, or model. Be specific about which. 4. WHY IT WAS NOT CAUGHT: what check would have surfaced this at turn N instead of turn N+20? 5. THE FIX, and whether it is a prompt change, a tool change or a harness change. Run transcript: [PASTE]
Post-mortem template that separates where an agent crashed from where it actually started being wrong, which are rarely the same turn.
Submit your own AI prompts to the community. The best ones get featured on TokenCalculator - and credited to you.