Cut off at step 24: the budget we raised was not the one the run used
DevFlow Daily, AI-assisted writing · · updated
This is a postmortem from our own harness, a .NET service that runs long goals for 31 content sites by driving AI models through a fixed number of steps. The dates are 2026-11-05 and 2026-11-06, and every figure comes from the harness's run traces and code [1].
What we saw
The site-review playbook asked for a budget of 36 steps. The nightly review kept ending with partial results and a note that steps had run out, so the budget was raised to 50. The next run ended the same way, at step 24 [1].
Two numbers explain the 24. A run must start writing its result after budget − budget/4 steps, so a run with 30 steps has to stop reading at step 23 and is refused at step 24 [1]. And every run was getting 30 steps, whatever the playbook asked for: the trace of the 2026-11-05 review kept 7 tool calls for its result, enough to have read a few sites and none of the rest [1].
The wrong fix, and why its tests passed
The first fix raised the playbook's budget, and its tests passed. They passed because they checked the playbook's number, not the number the run was given [1]. A test that reads a setting proves the setting was written; it proves nothing about what a later layer does with it.
The real fix
Reading the trace line by line turned up the line "STEPS KEPT FOR THE RESULT (7 tool calls)", and from there the cause: the function that starts each run clamped any requested budget to a constant of 30 steps, a safety limit from an earlier version [1]. The fix gave that function a separate ceiling of 60 for playbooks that need more, clamps requests into 1 to 60, keeps 30 as the default, and comes with a test that starts a run with a large requested budget and reads the budget it actually got [1].
Put in a requested budget and the ceiling it meets; the result-writing rule is the harness's own [1]:
- Budget the playbook asks for: 50 steps
- Ceiling where the run is started: 30 steps
Works out: Steps the run is given; Last step for reading; Step where the run is refused
With the old ceiling of 30, any request lands at 30 and dies at step 24. With the new ceiling of 60, a request of 50 gets 50 and has until step 38 to read.
Timeline
- Nightly site reviews ended with partial results and a note that steps ran out [1].
- The budget was raised from 36 to 50 in the playbook; the next review ended at step 24 again [1].
- The trace was read line by line: 7 tool calls kept for the result, 30 steps given, not 50 [1].
- The run-start function was found to clamp every requested budget to a constant 30 [1].
- A separate maximum of 60 was added, requests clamped to 1..60, 30 kept as the default [1].
- A test was added: a run started with a large requested budget reports the budget it actually got [1].
What we took from it
- Test the value the system uses, not the value you set. A setting that a later layer overrides is a comment [1].
- Two limits with one name, a default and a ceiling, need two names [1].
- Read the trace before raising a number [1].
- An agent that runs out of steps should report how many steps it was given, so the next person reads the real limit [1].
What this does not show
One harness, one playbook. Whether other agent frameworks hide the same clamp is not tested here; the step-writing rule (results due after budget − budget/4) is ours, not a standard [1].
A notebook entry for DevFlow Daily, written with AI from the harness's own records and checked by hand. The figures are the harness's; the calculator applies its two rules to any budget you type.