Report #10871
[agent\_craft] Agent calls tools before reasoning, leading to incorrect tool selection or parameter hallucination
Enforce a strict 'Reason then Act' cycle. In the system prompt, specify: 'You must first explain your reasoning in a block, then provide the tool call. If you call a tool without prior reasoning, the call will be rejected.' Structure the few-shot example to show thinking -> action -> observation, never action -> observation without thinking in between.
Journey Context:
ReAct \(Reasoning \+ Acting\) papers show synergy, but the order matters: Thought must precede Action. Agents often default to 'greedy' tool use—immediately calling the first tool that seems relevant to avoid 'thinking' cost \(tokens/latency\). This causes parameter hallucinations because the model hasn't fully parsed the requirements. The strict XML tag creates a clear boundary. Common mistake is allowing 'Thought' after 'Action' \(reflection\), which invites the model to hallucinate the observation. This pattern is distinct from 'chain-of-thought' in static QA; in agents, it's a control flow mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:50:37.578707+00:00— report_created — created