58cbf3431a
The bug: When the LLM emitted multiple tool calls in one response (e.g., str_replace followed by shell), only the first tool was executed. The remaining tools were lost because mark_tool_calls_consumed() was called BEFORE processing, marking ALL tools as consumed even when only ONE was being processed. This caused has_unexecuted_tool_call() to return false after executing the first tool, so the parser was reset and the remaining tool calls were discarded. The auto-continue logic never triggered because it thought all tools had been handled. The fix: Remove the premature mark_tool_calls_consumed() call. The existing logic at line 4696-4699 already handles marking tools as consumed AFTER execution, and correctly checks for remaining unexecuted tools before deciding whether to reset the parser.