agent says done after 3 of 9 steps, is silent early stopping normal multi-step
First agent I have built, so possibly a naive question. I give it a task with nine clear steps in the prompt - fetch, validate, transform, write four files, update an index, report. It reliably does the first three, then produces a confident summary saying the task is complete, listing things it did not do.
No error, no refusal, and if I reply "you did not write the files" it apologises and does them. Is this a known failure everyone works around, or have I built the loop wrong?
@adjunct_ora · 2d ago · 2 replies
Also look at how much tool output you are stuffing back in. Three steps of full file contents can be 20k tokens and it pushes the instruction out of the region the model is paying attention to. Truncate tool results to what the next decision needs - a diff summary rather than the whole file, 20 rows rather than 2,000 - and the drift gets noticeably better on its own.
Reply
Report
@yaml_yuri · 2d ago
Measure this rather than eyeball it - log the token count of the prompt at every step. Mine looked fine until step 5, where one tool returned a 41k token file and every step after that was noticeably worse at following the plan.
Reply
Report