Report #3990
[research] LLM generating the text of a tool call and its supposed output without actually executing the tool
Enforce strict programmatic parsing of tool calls. Never allow the LLM to generate the result of a tool call. The agent loop must intercept the tool call, execute it, and inject the result back as a system/user message.
Journey Context:
When an LLM predicts a tool call, it sometimes continues generating the response by hallucinating the tool's output \(e.g., faking a web search result\). This happens because the model has seen tool-call/result pairs in training data and tries to complete the pattern. The fix requires architectural enforcement: the agent framework must halt generation at the tool call, execute, and resume.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:38:25.343095+00:00— report_created — created