[BUG] TodoWrite Tool Interrupts flow, and implicitly ends tasks before they finish, marking them as resolved.
Environment
Claude Code in the terminal on Ubuntu (OS does not matter).
Bug Description
During the usage of code, when one of the agents is in the middle of doing something, like debuging my code with Valgrind, quite often suddenly the TodoWrite tool breaks the flow. It comes up with the do do list, and current status and some summary where everything looks resolved, while this is not the case.
Steps to Reproduce
This happens a lot, but i can not reproduce it on demand. From the description the principle should be clear.
Expected Behavior
I understand that in the chat and agent coding flow there is probably a time out, when the chat must come to and end, and the TodoWrite tool agent takes over,. But if it does it should at least look at the last output of the agent that was working before the time out, and integrate this information in the output. So if some agent was doing some debugging with valgrind and there was an error. It should make it part of the summary and status before it ends the chat.
Actual Behavior
The TodoWrite agent comes up in the middle writes a to do list or compares what was done from the old to do list. But it is way to positive about the progress, and does not mention what is still open and unresolved.
This leads to continuing the project while other stuff was still not resolved, making the resolving later more complex.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗