Skip to content
5.0 Upwork, 100+ reviews Adobe Certified since 2021 New: become your own Magento developer Learn more →

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.

Was this helpful?
Kishan Savaliya Online 10 AM to 7 PM IST Chat on WhatsApp