Environment Variables to Adjust Claude's Context Window
mattyp · x · 2026-07-07
Introduces two environment variables for adjusting Claude Code's auto-compaction threshold: CLAUDEAUTOCOMPACTPCTOVERRIDE accepts a percentage integer (e.g., setting it to 20 triggers auto-compaction for Fable at 200k/20%), and CLAUDECODEAUTOCOMPACTWINDOW can be set directly to a token count (e.g., 200000).
The author notes that a smaller window might reduce costs, decrease usage, or improve model performance.
More from coding & agent
- SF 'Code Engineering' event picks up where 1,000-person harness engineering meetup left off — LangChain · 2026-10-27
- Prompt turns Claude Code into an iPhone backup forensics tool exposing 30-day 'deleted' photo copies — alex_verem · 2026-10-27
- Prompt turns Claude Code into a forensics tool finding deleted iPhone photos in backups — alex_verem · 2026-10-27
- Phones won't be mobile IDEs but control planes for agent fleets, argues Yuchen Jin — Yuchenj_UW · 2026-10-27
- FrontierCS 2 launches on Kaggle: 48 tasks make agents beat published CS papers — MeganRisdal · 2026-10-27
- Agent Field Kit launches $29 security runbooks for production AI agents — alvelda · 2026-10-27