Skip to content

Auto-compact Earlier

Claude Code automatically compacts conversations as they approach the context limit. You can make this happen earlier.

{
"env": {
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "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.