My Claude Code session keeps making the same mistake, how do I fix it?

This is context poisoning: a wrong assumption ended up in the conversation history early and now every reply reinforces it. Three fixes, in order: (1) /clear and start fresh with the correct constraint in your first message; (2) move the constraint into CLAUDE.md so it survives /clear; (3) if it's a class-of-mistake (e.g. "keeps using ObjectManager"), add a PostToolUse hook that greps for the pattern and feeds the failure back. Don't try to argue the model out of the mistake in-thread, you'll just spend tokens. Reset, anchor harder, and the next session lands clean.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude, anti-patterns

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.