Disabling Claude Code's Auto-Memory Feature Improves Performance
The author discovered that Claude Code's auto-memory feature, which is enabled by default, is causing performance issues. By disabling the feature using an environment variable, the model's behavior improved significantly.
Why it matters
Disabling the auto-memory feature can significantly improve the performance and reliability of the Claude Code model, which is important for developers and users who rely on the tool.
Key Points
- 1Claude Code's auto-memory feature is enabled by default and takes up nearly half of the system prompt
- 2The auto-memory feature is not accurate and causes the model to behave erratically, such as editing files without reading them first
- 3Disabling the auto-memory feature using an environment variable or settings file reduces the system prompt size by 43% and improves the model's performance
Details
The author discovered that Claude Code's auto-memory feature, which is enabled by default, is causing significant performance issues. The feature takes up nearly half (46.9%) of the system prompt, with a 12,540-character section dedicated to instructions on what to save, when to save it, and how to structure memories. This leads to the model spending a lot of time thinking about memory, even when the user hasn't requested it. The author found that the auto-memory feature is not accurate, with zero successful memory saves across their entire testing session. By disabling the feature using an environment variable or settings file, the system prompt size was reduced by 43%, and the model's behavior immediately improved, reading files before editing them and providing more direct responses to tasks.
No comments yet
Be the first to comment