Original Reddit post

Since my comment about keeping a MISTAKES.md file got quite a bit of feedback, I thought I’d make a dedicated post about it. The setup is trivial. A MISTAKES.md in the repo, and one line in CLAUDE.md: Log mistakes in MISTAKES.md (what happened, root cause, prevention). Every time the agent breaks something, or you correct it, it appends an entry: what happened / root cause / consequence / the rule that prevents a repeat. Newest first. No tooling, no plugin, no vector store. Two things make it worth the effort. The agent reaches for it. You’ll see things like “this approach was avoided because it caused XYZ before, as documented in MISTAKES.md.” But the better outcome is that the knowledge leaves the log entirely. The file stops being a diary and becomes something the agent points at. Repeat entries graduate into hard rules. This is the part I didn’t expect. When the same failure shows up four or five times it stops being a mistake and becomes a law in CLAUDE.md. MISTAKES.md is where evidence accumulates; CLAUDE.md is where it gets enforced. Without the log you have a vague sense that “that area is flaky” instead of a countable pattern with a fix. submitted by /u/thabxi

Originally posted by u/thabxi on r/ClaudeCode