Answer
What should an AI agent log during a long task?
Decisions and their reasons, actions and their results, and everything it could not do. Not a narration of its progress.
Decisions and why they were taken, actions and what actually happened when they ran, and anything it could not do. A narrative of progress adds volume and answers none of the questions asked afterwards.
Logs get written to satisfy a general sense that there should be a record, and they end up recording the wrong thing: a stream of activity. That format answers what happened, which is rarely the question. The questions actually asked after an agent run are why did it choose this, did the thing it says it did actually happen, and what did it not do. A log should be designed backwards from those three.
Decisions with reasons come first. Whenever the agent chose between approaches, skipped something, interpreted an ambiguous instruction, or concluded that something was out of scope, that is a decision and the reason is the useful half. This is also the content that lets a later session — or a person — tell whether the decision still holds, which a bare record of the choice cannot support.
Actions with observed results come second, and the emphasis is on observed. A log entry saying a record was updated is worth much less than one saying the update was issued and the record now reads a particular way. The gap between the two is where the most common false completion lives: the command was sent, something went wrong, nothing checked, and the log records the intention as though it were an outcome.
Failures and refusals come third and are the most frequently omitted. What could not be read, what returned an error, what was attempted and abandoned, what was ambiguous. These entries feel like admissions of trouble and they are the highest-value content in the file, because they are the only place the boundary of the work is visible. A log showing an unbroken sequence of successes on a long job is describing a run nobody has looked at closely.
There is also a counting layer that is worth keeping separate from prose. How many items existed, how many were processed, how many skipped, how long it took, what it cost. These are the entries that make it possible to compare runs, notice drift, and answer questions about whether the thing is still working. Buried in narrative they are unusable; kept as a small structured summary they are the first thing anyone reads.
Two things to leave out. Restating the plan, which is already written down and only creates a second version that can disagree with the first. And a general commentary on progress, which is the bulk of most agent logs and is the content nobody has ever gone back to read. The test for any candidate log line is whether it would change what somebody does when something turns out to be wrong; most narration would not.
The only question anyone asks a log is why did it do that, and a log full of what it was doing cannot answer it.
Siddharth Sharma, Context Theory
Related questions
Should the agent write the log or should the runtime?
Both, doing different jobs. The runtime records tool calls and their raw results reliably and without judgement, which is the layer you want when something is disputed. The agent records reasons, which the runtime cannot see. Relying only on the runtime gives you a complete record of what happened and no account of why, and relying only on the agent gives you an account that was written by the party being examined.
How much logging is too much?
When nobody reads it, which happens faster than expected. A file that is thousands of lines of narration will be searched rather than read, and searching only finds what you already suspected. Keeping the decision and failure entries in a short separate file, with the raw trace available elsewhere, is what makes the record usable during an actual incident.
METHOD
Every figure below carries its source and the date it was verified. Nothing on this page is asserted.
The numbers on this page.
| What | Value | Specific to |
|---|---|---|
| Sub-15-minute compliance — automated routing vs manual only | 62.5% vs 39.1% | Category-wide |
| Firms that never responded to a web enquiry at all | 23% | Category-wide |
2026 speed-to-lead benchmark · verified
Oldroyd, McElheran & Elkington, "The Short Life of Online Sales Leads", Harvard Business Review (March 2011) · 1.25M inbound leads across 2,241 US firms · verified
What is specific to this page.
| Kind | Claim | Check it against |
|---|---|---|
| Workflow | A log is read to answer why a choice was made, whether a reported action actually took effect, and what was not done, so an activity narration satisfies none of the three questions despite being the most commonly produced format. | Taking any past agent incident and attempting to answer those three questions from the log that exists. |
| Software | Recording an issued instruction and recording an observed resulting state are different entries, and the gap between them is where false completion lives, because a command that failed silently is logged as an accomplished action. | Comparing log entries against actual system state after a run containing a write that was rejected. |
| Response | Failure and refusal entries are the only place the boundary of the work is visible, so a long-run log showing an unbroken sequence of successes indicates unexamined execution rather than a clean run. | Counting error, retry and abandonment entries in a long agent log and comparing against the run's tool-call failures. |
| Constraint | Runtime logs and agent-written logs cover different things and neither substitutes for the other, because the runtime cannot record reasons and the agent's account is written by the party under examination. | Comparing a runtime tool-call trace against the agent's own narrative for the same run. |
Each row would be wrong on another industry's page. Where a sourced figure exists it is in the table above instead; these are the constraints that shape the work and do not happen to be numbers.
Start with the measurement.
Reading about a benchmark is not the same as knowing your own number. The audit produces yours, measured rather than estimated.
$497 · delivered in 5 business days · credited against month one