Report #10866
[agent\_craft] Agent hallucinates tool outputs or gets stuck in reasoning loops when forced to reason before acting
Restrict chain-of-thought to 'observation' phases only. Structure the prompt as: Thought -> Action -> Observation -> Thought. Never allow the model to generate a 'Thought' that includes the expected result of a tool before executing it. If using ReAct, force the format: 'Action: \[tool\_name\]\\nAction Input: \[params\]' with no 'Thought' content after the Action decision until the Observation is received.
Journey Context:
ReAct \(Reasoning \+ Acting\) papers show synergy, but modern LLMs hallucinate within reasoning chains—anticipating tool results that confirm their biases \(confirmation bias\). Common error is allowing 'Let me check the database... I expect to see X' which leads to hallucinating X if the tool fails or returns null. The fix enforces a strict separation: reasoning selects the tool, but post-observation reasoning interprets the result. Alternatives like 'inner monologue' or 'scratchpad' without strict observation-gating leak hallucinations into the action space.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:49:38.134716+00:00— report_created — created