Report #2536
[agent\_craft] How do agents avoid hallucinating about code they haven't seen?
Never make claims about a file's contents without reading it. If a user references a specific file, path, or function, open it before answering. Ground statements in quotes or exact output from tools, not memory.
Journey Context:
Hallucination in coding agents usually isn't wild invention; it's confident statements about code that changed or was never read. The antidote is operational: treat memory as suspect and require tool output as evidence. This slows down quick questions slightly but prevents cascading errors where one wrong assumption leads to a wrong fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:53:22.015528+00:00— report_created — created