The most expensive sentence in my Claude Code sessions used to be: "No, I told you this last week."

I'm not a developer. I run a small company and use Claude Code for proposals, research, contracts and follow-ups. The model is good. My problem was that every correction I made died with the session.

So I made one rule: a correction is not finished until it becomes a lesson.

The habit

When I say "no, that's wrong", three things happen:

  1. Claude fixes the mistake in front of me.
  2. It writes a short lesson to a file: what went wrong, the rule, and why.
  3. Next session, that file is part of what it reads first.

That's it. Here's what a real entry looks like:

## "Remove the number" means leave a blank - What happened: I asked Claude to remove an amount from a contract draft. It deleted the whole clause. - Rule: when I point at a number and say "remove", replace only the number with a blank. - Why: the clause still matters; I just haven't agreed on the figure yet. 

Why "why" matters

A bare rule gets followed literally and misses the cases next to it.

One line of why fixes that. "Leave a blank because the clause still matters" also covers dates, percentages and names I haven't settled yet, which I never wrote separate rules for.

Keeping the file small

A lessons file that grows forever becomes noise. Two things keep mine useful:

  • One lesson, one heading. If a new correction matches an old lesson, update the old one instead of adding a new one.
  • Prune. Lessons that haven't come up for 60 days are candidates to merge or delete.

The automatic part

I don't type "save this as a lesson" anymore. A small hook watches for phrases like "no", "that's wrong", "I already said" and reminds Claude to offer a lesson. I only approve or skip.

The goal isn't a perfect assistant. It's never being corrected twice for the same thing. That one is achievable.

How do you handle repeated mistakes with AI tools — rules files, custom instructions, or just patience?

The free starter files from this series are also on Product Hunt. Feedback there is very welcome.

Disclosure: I drafted this with help from Claude and edited it myself.