I've been using the Claude Sonnect 4 agent mode in VSCode for my Unity project and it was working perfectly for a while. However, recently it seems to have gotten stuck on a previous solution approach that it suggested for synchronizing my game state through Firebase. I attempted to follow that approach, but it ended up being too complex, so I found a different solution. Now, whenever I ask Claude about my current approach or for suggestions, it keeps going back to that outdated method it suggested weeks ago, even though there's no link to it in my code anymore. I've tried forcing it to recheck the codebase, but it starts normally and then reverts to the old solution. It's like it's hardwired to that context, and nothing seems to fix it, even after restarting VSCode.
1 Answer
Try clearing or rewriting the claude.md file related to your task. After that, perform a "/compact" command. When that's done, you can edit claude.md. Alternatively, you could do a "/compact" and rename claude.md to something like dont-use-me.md, then run "/init" to reset it.
That approach worked for me before; sometimes it just needs a soft reboot to refresh its memory.
I couldn't find those files anywhere in my VSCode project either. I found a Copilot instructions file in the AppData, but it was empty. In the end, I just uninstalled VSCode, cleared the leftover files in AppData, and reinstalled it. Now Claude doesn’t remember the old approach, so hopefully that clears the context.