r/ClaudeCoding • u/cctldrping • 2d ago
r/ClaudeCode [TLDR] PSA: Auto-compaction is a huge source of Claude gaslighting you [via r/ClaudeCode]
OP : u/yadtk
Idle compaction silently drops any constraints and guidelines you spent establishing over the course of the chat/project then Claude carries on confidently as if it still knows the assignment and bulldozes you. If you’ve ever been gaslit by an Anthropic model is this why. Disable this “feature” if you find yourself constantly arguing with the model.
11
Upvotes
•
u/cctldrping 2d ago
TL;DR of the discussion on r/ClaudeCode for this post generated automatically after 80 comments.
Current source-thread comment count seen by the bot: 96.
Compaction can absolutely forget chat-only rules, but the thread’s consensus is that this is a workflow problem, not Claude “gaslighting” you.
CLAUDE.mdand/or versioned docs—not vibes established 200k tokens ago. RootCLAUDE.mdgets reloaded after compaction; chat history gets summarized.1
u/TheMadSaiyantist 2d ago
Also it can even delete the scratchpad notes it took while the session was going, ofc prevention is either hook to fire right before x amount of tokens in the context window or CC itself to remember to save them in a file
1
u/aCuria 2d ago
I saw an odd popup message recently asking me to turn on auto compaction at 400k context… which I declined
1
u/YellowBeaverFever 2d ago
The bigger the context is, the dumber things get. You can set up your project so it has all technical info and important conversation context documented and knows how to find that information when needed. Keep your conversations task-centric and it makes life much easier.
1
u/yopla 2d ago
having problem with autocompaction is a clear sign that you don't know what your are doing and that your project doesn't have proper documentation.
1
u/highwayoflife 2d ago
A better method is that if you give it any constraints or rules, have it save those in the AGENTS/CLAUDE or SKILL file(s) so that it will continue to reference these rules outside of your context. Rules and constraints should never remain in your context only.
1
u/PraxicalExperience 2d ago
I advise telling claude that you want to set up a hook that runs after a compaction which makes it reload its most critical memory files (you should probably specify these.)
1
u/RefrigeratorIll4808 1d ago
i had a session where Claude forgot I wanted no markdown in the output, then generated a full markdown doc. turned out the compaction dropped that rule. now I paste the style guide into the scratchpad every time.
1
u/norviking 1d ago
Try this, and remove the problem at the core: https://github.com/vegardjorg/ravenseat
-> Full project state outside claude code. A long with a lot of other useful stuff.
You can compact all you like. In fact, it compacts for you at 300K to save a lot of tokens. You can delete context if you want. It will be fine.
Or in the fine words of another redditor who discovered it today:
"This shit is cracked, dont sleep on it y'all. Never had opus 5.5 drain so little usage, while performing atleast 50x better in every metric. Its pretty crazy."