[DOCS] Create a centralized reference page for all Claude Code environment variables
Documentation Type
Missing documentation (feature not documented)
Documentation Location
_No response_
Section/Topic
Claude code CLI
Current Documentation
_No response_
What's Wrong or Missing?
Environment variables for Claude Code are scattered across changelog entries,
GitHub issues, and community threads — with no official central reference.
Users are sharing unofficial vars like CLAUDE_AUTOCOMPACT_PCT_OVERRIDE
(to trigger compaction before the 95% default) on Reddit/Discord, but there's
no way to know which ones are real, stable, or even still work.
Some vars that appear in docs or changelogs are undocumented elsewhere —
no type, no default value, no version info. Makes it hard to trust them.
Suggested Improvement
Create a dedicated "Environment Variables" reference page in the docs with:
| Variable | Description | Type | Default | Since version |
|---|---|---|---|---|
| CLAUDE_AUTOCOMPACT_PCT_OVERRIDE | Trigger auto-compact before the 95% default | number (1–100) | 95 | vX.X |
| ANTHROPIC_BASE_URL | Custom API base URL | string | — | vX.X |
| DISABLE_PROMPT_CACHING | Disable prompt caching | boolean | false | vX.X |
| ANTHROPIC_LOG | Log level | string | — | vX.X |
| MCP_TIMEOUT | MCP server timeout | number | — | vX.X |
| ... | | | | |
This prevents users relying on pirated/unofficial env vars from community posts
that may break across versions, and gives a single source of truth.
Impact
High - Prevents users from using a feature
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗