{"id":"2063295395434831922","url":"https://x.com/0x_rody/status/2063295395434831922","text":"","author":{"name":"rody","username":"0x_rody","avatarUrl":"https://pbs.twimg.com/profile_images/2041947351120572416/4IBmZ3QT_200x200.jpg"},"createdAt":"Sat Jun 06 16:22:11 +0000 2026","engagement":{"replies":8,"retweets":32,"likes":261,"views":354912},"article":{"title":"How to Make Claude Code Stop Making Stuff Up When It Doesn't Know (Exact Setup Inside) ","previewText":"Claude Code lies to your face every day. Made-up functions, fake imports, \"tests pass\" when nothing ran. The fix is a 4-layer setup that makes lying expensive.\nClaude tells you the bug is fixed. Two","coverImageUrl":"https://pbs.twimg.com/media/HKJMI9zXcAAvJn4.jpg","content":"Claude Code lies to your face every day. Made-up functions, fake imports, \"tests pass\" when nothing ran. The fix is a 4-layer setup that makes lying expensive.\n\nClaude tells you the bug is fixed. Two hours later you find out the function it called never existed.\n\nMost devs learn to double-check everything and blame the model. The real fix catches every lie before it leaves your machine.\n\nHere's the full honesty setup 👇\n\n![](https://pbs.twimg.com/media/HKJJj2kW0AA8Ybi.jpg)\n\n## Why Claude makes stuff up in the first place\n\nClaude is a text predictor. When it doesn't know something, it predicts text that looks right. Made-up function names look like real ones. Confidently delivered nonsense reads the same as confidently delivered truth.\n\nYou can't tell the difference until your code breaks two hours later in a way that takes another hour to debug.\n\nThe fix isn't a smarter model. It's making Claude's output checkable in real time and making \"I don't know\" cheaper than guessing. \n\n4 layers below. Together they cut fabrication to roughly zero.\n\n![](https://pbs.twimg.com/media/HKJJxOMXgAAQ4VG.jpg)\n\n## Layer 1: The CLAUDE.md honesty rules\n\nThe first layer is a set of rules in CLAUDE.md that tell Claude exactly when to admit uncertainty and exactly how. Drop this in your project root:\n\nThese rules look obvious. \n\nThey aren't, because by default Claude is optimized to look helpful, and \"I don't know\" feels unhelpful unless you give it explicit permission.\n\nThe last line is the most important one. It's the \"I don't know\" license, and most people never grant it.\n\n## Layer 2: The verification-before-write pattern\n\nThe second layer forces Claude to verify before it writes. Add this to CLAUDE.md under the honesty rules:\n\nThis costs Claude a few extra tool calls per session. It saves you the hours you would've spent debugging fake function calls.\n\n## Layer 3: The hooks that catch lies in real time\n\nThe third layer is hooks in settings.json that run a type checker or linter every time Claude writes a file. If Claude invented an import, the checker fails instantly, and Claude has to fix it before claiming the task is done.\n\nHook output goes back to Claude as context. If tsc says \"Cannot find module 'foo'\", Claude sees it immediately and fixes the fabricated import. No invented code survives a PostToolUse check.\n\nFor tasks involving tests, add a Stop hook that runs the suite before Claude can declare the session done:\n\nNow Claude can't say \"done, tests pass\" without actually running them. The hook runs them. \n\nThe result goes back to Claude. If they fail, Claude has to fix them or admit they don't pass.\n\n## Layer 4: The fact-checker subagent\n\nThe fourth layer is a subagent whose only job is to review Claude's claims before they ship. \n\nDrop this in .claude/agents/fact-checker.md:\n\nInvoke this agent before commits or before sharing results with your team. It catches the lies the other 3 layers missed.\n\n![](https://pbs.twimg.com/media/HKJKjNqXYAAc9Gt.png)\n\n## The \"I don't know\" license\n\nClaude was trained to be helpful, and admitting ignorance feels unhelpful. So it guesses, and the guess looks right.\n\nThe fix is granting permission to not know. CLAUDE.md is half of it. Your reaction is the other half. Reward \"I haven't verified this\" with patience and you get honest Claude every session. Punish it with frustration and Claude goes back to guessing.\n\nNot a config, a habit. The most underrated fix in the stack.\n\n## How to tell it's actually working\n\nThree signs in your daily sessions.\n\nClaude asks before adding dependencies. \"Should I add X or use the stdlib?\" instead of silent npm install.\n\nClaude references file:line when it talks about existing code. \"validateToken in src/auth/middleware.ts:47 does Y\" instead of \"the validateToken function does Y.\"\n\ntsc and your linter stop screaming. Hooks catch the rare fabrications instantly and Claude self-corrects, so by the time you look, the lies are gone.\n\nNot seeing these after a day or two? One layer isn't loaded. Usually CLAUDE.md, wrong location or wrong name.\n\n![](https://pbs.twimg.com/media/HKJLk6rWMAAWMkA.jpg)\n\n## Common mistakes that keep Claude lying\n\nCLAUDE.md is too long. Claude reads the first part and skims the rest. Honesty rules in the first 50 lines.\n\nHooks log silently. If output doesn't reach stdout, Claude doesn't know it lied. Make sure hook output goes back to the session.\n\nYou skip plan mode. That's where Claude exposes wrong assumptions before writing. Skip it and you skip the cheapest moment to catch lies.\n\nYou don't call the fact-checker. A subagent only works if you actually invoke it. Make @fact-checker part of your commit flow.\n\nYou react badly to \"I don't know.\" Punish honesty once and Claude goes back to guessing. The other 3 layers don't stick without this one.\n\n![](https://pbs.twimg.com/media/HKJLuYZXEAArPaJ.png)\n\n## The 5-minute honesty audit\n\n1 minute: copy the CLAUDE.md honesty rules and verification protocol into your project root.\n\n1 minute: copy the hooks block into ~/.claude/settings.json or .claude/settings.json.\n\n2 minutes: create .claude/agents/fact-checker.md with the template above.\n\n1 minute: run a task you'd normally double-check. Watch for tsc output coming back to Claude. Confirm Claude says \"verified\" or \"I haven't verified this\" explicitly.\n\nDone. Fabrication drops from \"every other session\" to \"rare and caught immediately.\" The model didn't get smarter. Your setup did.\n\nThanks for reading!\n\n![](https://pbs.twimg.com/media/HKJNXAfWQAA3uIk.jpg)"}}