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
- A 9B Ollama agent can run a fully local DJ radio with tools, memory, and TTS — pinku1 · 2026-07-27
- Bugbot rejects an MCP permission flag because it would break path-scoped isolation — zeeg · 2026-07-27
- One GPT-5.6 agent is guarding a Blink security system while another makes a parody rap album — repligate · 2026-07-27
- An agent got unblocked by reusing a logged-in browser, not stealth tricks — armanidev_ · 2026-07-27
- Paper argues graph topology can become the core operating system for AI agents — theomitsa · 2026-07-27
- Claude Code desktop adds UI markup feedback for smoother visual editing — EricBuess · 2026-07-27