⌨️CLAUDE_AUTOCOMPACT_PCT_OVERRIDE
Also known as CLAUDE_AUTOCOMPACT_PCT_OVERRIDE environment variable
It sets the percent full at which a chat is squeezed.
Think of it like
It is like you empty the bin when it is half full. You do not wait till it spills.
Example
Lucy finds Claude gets sloppy late in long chats. She sets this to 60, so the chat is squeezed while it is still sharp.
Why it matters
Squeezing early keeps the chat small. A model often works better with less in front of it.
Definition
Example code
bash
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50
claudeCommon mistake
Key takeaways
- 11 to 100. Percent of the window.
- 2Only lowers it. High values ignored.
- 3Subagents too. Same rule.