My favorite Claude Code tip lately: set auto-compact to 400k
By default, Claude Code lets a conversation grow to about 967k tokens before it compacts, so I moved mine to 400k.
Models tend to get worse at recalling details as the context window fills up (people call it context rot), and Anthropic writes about it in their own context engineering guide.
So when I run long tasks or goals, Claude compacts well before it gets anywhere near that territory.
I've been letting goals run for hours like this and getting noticeably better results.
The tradeoff is more compactions, but for long goals it's been worth it for me.
It also goes a little easier on my usage limits, since every turn isn't re-reading a nearly full context window.
How to set it:
→ Type /autocompact in Claude Code and pick a window
→ Or add "autoCompactWindow": 400000 to your settings.json (you can also just ask Claude to do this in natural language)
What other Claude Code tips have been helping you out lately?