[Bug] Agent hallucinates tool usage when tool permissions are misconfigured
Bug Description
When using an agent, if the tool permissions are not set properly, the llm seems to hallucinate about tool usage it does not have access to. I created an agent using claude code and it incorrectly set up the tools list with yaml-style (one per line) instead of a comma separated list. This would have been fine if when I ran my agent that relied on those tools, it did not hallucinate about usage of them. The agent was supposed to write a report to a file at the end of the process and it was also instructed to validate that it could read the file in its report back to the main agent. I ran this many times and even in parallel and every time the results were the same. The main agent was saying that the report was written but when I checked, or had it check, the files were nowhere to be found. I ultimately realized that the agent's definition of permissions was wrong, but what is concerning is that in every case, the main agent was apparently told by the subagents that everything was fine and that the report was generated successfully.
Environment Info
- Platform: darwin
- Terminal: tmux
- Version: 2.0.21
- Feedback ID: e9d60aa0-7a83-4490-aeb6-6479afcd960c
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗