You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chat): the capped final pass can stream a stray tool call and skips its hooks #20720
Found in review on the merge train (PR #20713), in autobot-backend/chat_workflow/graph.py:
force_final_answer drops the final pass's tool calls (_unused_calls), but _run_llm_iteration_plan has already streamed the raw text. If the model ignores FINAL_ANSWER_INSTRUCTION, the user sees and the transcript stores a raw TOOL_CALL block.
The final pass skips the execute and complete hooks and agent.step.* events that generate_response emits, so audit logs and the reasoning trace miss it.
Acceptance criteria
A final pass that emits a TOOL_CALL never streams or stores it; the apology message is used when no answer remains. Tested.
The final pass emits the same hooks and step events as a normal pass. Tested.
Activity