Report #88117
[agent\_craft] Agent hallucinating tool calls when user query requires no tools or conversation only
Include an explicit 'finish' or 'respond\_to\_user' tool with a clear description: 'Use this when the user is making conversation, asking general questions, or when no other tools are applicable.' This provides a valid target for the model's 'take action' bias without inventing fake parameters for functional tools.
Journey Context:
When all provided tools are specialized \(e.g., 'search\_code', 'execute\_command', 'modify\_file'\), the model often hallucinates calls with fake arguments or misuses a tool for simple greetings like 'Hello' or questions like 'What time is it?' This happens because the system prompt implies 'you have tools, use them,' creating pressure to output valid tool XML/JSON. Standard prompts saying 'only use tools when necessary' are ineffective against this prior. The counter-intuitive fix is to provide a 'pressure release valve': a no-op tool that explicitly allows inaction. This channels the 'do something' bias into a valid, harmless call \(the finish tool\). Without this, models invent parameters or force irrelevant tool use to satisfy the implicit pressure of tool availability. This is distinct from classification approaches because it works within the tool-calling fine-tuning of the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:29:13.589121+00:00— report_created — created