August 3, 2026
Agent Cost Postmortem Template
A practical template for understanding why an AI agent workflow spent more than expected and what to change before it runs again.
Quick answer
An agent cost postmortem should identify the workflow, model, token shape, retries, tool calls, output produced, and prevention rule. The goal is not blame. It is making the next run cheaper or more clearly bounded.
Start with the workflow
Provider bills show model spend. They rarely show which automation caused it. Name the task, run id, trigger, owner, and expected output before looking at token charts.
Compare cost to progress
A long research run can be worth the spend. A tiny watcher that loops all night is not. The postmortem should record artifacts produced, commits made, status transitions, and whether the run ended done, blocked, or timed out.
Look for repeat patterns
- same error across retries
- expensive fallback model used for routine work
- large context loaded repeatedly
- tool call fan-out with no narrowing
- status file stayed running without terminal state
How Clawback helps
Clawback ties spend back to the workflow, so teams can write postmortems around behavior instead of guessing from a blended invoice.
FAQ
What should every postmortem include?
Workflow, trigger, model, tokens, retries, tools, artifacts, outcome, and the prevention rule.
Should every expensive run be treated as a bug?
No. Expensive useful work is different from expensive stuck work.
What is the best prevention rule?
Stop repeated identical failures and mark the run blocked with a specific next action.
See your actual numbers
The calculator runs in your browser. No account needed.