Incident report: the nightly agent review that died at step 24, and why raising its budget changed nothing
Firsthand incident from an AI agent harness that runs long goals for one owner's 31 content sites (a .NET harness driving AI models). Dates are 2026-11-05 and 2026-11-06. The figures are from the harness's own run traces and code.
The short answer
The review's step budget was set in one place and silently overridden in another. Every run was clamped to 30 steps, the run had to start writing its result after 23, so the nightly review was cut off at step 24, every night. The first fix raised the setting and changed nothing, because the setting was not what the run used. The second fix put a ceiling of 60 where each run's budget is actually decided and added a test that reads the effective budget.
What we found
- The site-review playbook asked for a budget of 36 steps, and a later change raised it to 50; both runs still got 30 steps.
- A run must start writing its result after budget − budget/4 steps, which for 30 steps is 23, so the review was refused at step 24.
- The trace of the 2026-11-05 review kept 7 tool calls for its result: it had read a few sites and none of the rest.
- The first fix (raising the playbook's budget) passed its tests, because those tests checked the playbook's number, not the number the run was given.
- The second fix set a ceiling of 60 steps in the function that starts each run and clamps the requested budget into it, with a test that starts a run and reads its effective budget.
Timeline
- Nightly site reviews kept ending with partial results and a note that steps ran out.
- Budget raised from 36 to 50 in the playbook. The next review run ended the same way, at step 24.
- Trace read line by line: "STEPS KEPT FOR THE RESULT (7 tool calls)". The run had been given 30 steps, not 50.
- Found: the run-start function clamped any requested budget to a constant step budget of 30, a safety limit from earlier.
- Fix: a separate maximum (60) for playbooks that need more, clamp requests to 1..60, keep 30 as the default.
- Test added: a run started with a large requested budget reports the budget it actually got, clamped to the ceiling.
Lessons
- Test the value the system uses, not the value you set. A setting that a later layer overrides is a comment.
- Two limits with one name (a default and a ceiling) need two names.
- Read the trace before raising a number.
- An agent that runs out of steps should report how many it was given, so the next person reads the real limit.
What this does not show
One harness, one playbook. Whether other harnesses have the same trap is not tested here.