{"name":"DISABLE_COMPACT","slug":"disable-compact","family":"env","title":"Environment variables","noun":"environment variable","description":"Unknown model names now get an assumed context budget so auto-compact works instead of stalling.","description_source":"entry","described_by":{"version":"2.1.223","anchor":"auto-compact-enforces-an-assumed-context-window-for-unrecogn"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":{"version":"2.1.248","released_at":"2026-08-27 20:35:36","spans":3}},"aliases":[],"entries":[{"version":"2.1.295","anchor":"disable-compact-now-feeds-a-new-compaction-predicate","heading":"DISABLE_COMPACT now feeds a new compaction check","line":"A new check that decides something about compaction now returns false whenever `DISABLE_COMPACT` is set","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text, named in this entry"},{"version":"2.1.274","anchor":"many-image-dimension-error-no-longer-suggests-compact-when","heading":"Many-image dimension error no longer suggests \/compact when compaction is disabled","line":"Image-too-large error stops suggesting \/compact when compaction is disabled","released_at":"2026-09-16 22:36:09","reason":"found in this entry's text"},{"version":"2.1.267","anchor":"sessioncompact-implementation-gated-by-disable-compact","heading":"session.compact implementation gated by DISABLE_COMPACT","line":"session.compact now blocks itself while DISABLE_COMPACT is set or a turn is still running","released_at":"2026-09-09 18:25:42","reason":"found in this entry's text, named in this entry"},{"version":"2.1.248","anchor":"disable-compact-now-takes-effect-mid-session","heading":"DISABLE_COMPACT now takes effect mid-session","line":"Setting or clearing DISABLE_COMPACT now takes effect immediately, not just at startup.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"},{"version":"2.1.235","anchor":"context-limit-banner-now-tells-you-auto-compact-is-switched","heading":"Context-limit banner now tells you auto-compact is switched off","line":"Context-limit banner now tells you when auto-compact is off and points you at \/config","released_at":"2026-08-18 18:24:10","reason":"found in this entry's text, named in this entry"},{"version":"2.1.235","anchor":"assorted-smaller-additions","heading":"Assorted smaller additions","line":"Small additions: Slack channel links, a 'pkg' path category, exposed trial length, and merged compact-disable checks","released_at":"2026-08-18 18:24:10","reason":"found in this entry's text, named in this entry"},{"version":"2.1.223","anchor":"auto-compact-enforces-an-assumed-context-window-for-unrecogn","heading":"Auto-compact enforces an assumed context window for unrecognized models","line":"Unknown model names now get an assumed context budget so auto-compact works instead of stalling.","released_at":"2026-08-05 22:51:13","reason":"named in this entry, found in this entry's text"},{"version":"2.1.223","anchor":"1m-context-and-compaction-checks-now-go-through-model-capabi","heading":"1M-context and compaction checks now go through model capability lookup","line":"Long-context eligibility is now looked up per model, and DISABLE_COMPACT turns off compaction.","released_at":"2026-08-05 22:51:13","reason":"named in this entry, found in this entry's text"},{"version":"2.1.216","anchor":"context-over-limit-warning-improved","heading":"Context Over-Limit Warning Improved","line":null,"released_at":"2026-07-20 20:19:37","reason":"found in this entry's text"},{"version":"2.1.98","anchor":"claude-code-max-context-tokens-environment-variable","heading":"CLAUDE_CODE_MAX_CONTEXT_TOKENS Environment Variable","line":null,"released_at":"2026-04-09 18:08:49","reason":"found in this entry's text"}],"entries_total":12,"docs":[{"source":"claude-code","path":"errors","title":"Error reference","documented":false},{"source":"claude-code","path":"model-config","title":"Model configuration","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"DISABLE_AUTO_COMPACT","slug":"disable-auto-compact","description":"Unknown model names now get an assumed context budget so auto-compact works instead of stalling."},{"name":"DISABLE_AUTOUPDATER","slug":"disable-autoupdater","description":"DISABLE_AUTOUPDATER=0 or false no longer disables updates; only truthy values count now."},{"name":"DISABLE_BRIEF_MODE_STOP_HOOK","slug":"disable-brief-mode-stop-hook","description":"When true, turns off brief mode's end-of-turn enforcement. Without it, in the main REPL thread or an SDK session with brief mode on and the brief tool available, Claude Code adds a hidden meta message carrying the brief enforcement text when the assistant made no brief tool call in the current turn and no such reminder was already added."},{"name":"DISABLE_BUG_COMMAND","slug":"disable-bug-command","description":"Temporary probes that checked whether old code paths still ran have been deleted; behaviour is unchanged."},{"name":"DISABLE_COST_WARNINGS","slug":"disable-cost-warnings","description":"When true, Claude Code does not print the session cost to stdout when the process exits and does not show the cost-threshold dialog. Without it, both depend on the account type and the organization or workspace role."},{"name":"DISABLE_DOCTOR_COMMAND","slug":"disable-doctor-command","description":"When true, the `\/doctor` command (alias `\/checkup`) is disabled."},{"name":"DISABLE_ERROR_REPORTING","slug":"disable-error-reporting","description":"Any non-empty value stops Claude Code from recording errors in its in-memory recent-error log and turns off the error-reporting path fed by `logError` and the uncaught-exception and unhandled-rejection handlers. Claude Code also copies the variable into the environment it builds for `byoc` sessions."},{"name":"DISABLE_EXTRA_USAGE_COMMAND","slug":"disable-extra-usage-command","description":"Setting DISABLE_EXTRA_USAGE_COMMAND now also hides the buy-credits prompts, which point at \/model instead."},{"name":"DISABLE_FEEDBACK_COMMAND","slug":"disable-feedback-command","description":"Feedback and bug-report commands are hidden when Claude Code runs through the SDK."},{"name":"DISABLE_GROWTHBOOK","slug":"disable-growthbook","description":"Auto mode uses sensible built-in defaults when remote config is missing, instead of everything off."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/disable-compact","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}