Auto-compact Earlier
Claude Code automatically compacts conversations as they approach the context limit. You can make this happen earlier.
Recommended setting
Section titled “Recommended setting”{ "env": { "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75" }}Why use 75%
Section titled “Why use 75%”- It leaves a buffer before the context window is nearly full.
- It helps long-running sessions stay smoother.
- It reduces the chance of hitting context pressure mid-task.
This pairs well with a status line that shows context percentage.