Skip to content
BENIBIX Learn

DISABLE_AUTO_COMPACT

AI⌨️ Claude CodeConfiguration

Also known as DISABLE_AUTO_COMPACT=1

Set to 1, it stops the automatic squeeze. /compact still works.

Think of it like

It is like you stop a helper from tidying your desk on their own. You can still ask.

Example

Lucy hates losing detail in the middle of a task. She sets this, and runs /compact herself at a good stopping point.

Why it matters

You pick when the chat is summed up, so it never happens halfway through a hard step.

Definition

DISABLE_AUTO_COMPACT set to 1 stops the automatic squeeze of a long chat. Claude Code no longer sums up the chat as it nears the limit, or when it sits idle. You can still run /compact by hand. It wins over the autoCompactEnabled setting.

Example code

bash
export DISABLE_AUTO_COMPACT=1
claude
Squeeze the chat only when you ask.
The middle column: only the hand squeeze is left.

Common mistake

Forgetting to compact by hand. A full chat then stops with an error at the limit.

Key takeaways

  1. 1
    No auto squeeze. Near the limit or idle.
  2. 2
    /compact still works. By hand.
  3. 3
    Wins over the setting. autoCompactEnabled.

Compare