DISABLE_AUTO_COMPACT vs DISABLE_COMPACT
People think DISABLE_AUTO_COMPACT and DISABLE_COMPACT are the same switch. The first stops only the automatic squeeze, so /compact still works when you run it. The second stops all of it, /compact included. Use the first to choose when the chat is summed up. Use the second only when the chat must never be summed up at all.
DISABLE_AUTO_COMPACT
Set to 1, it stops the automatic squeeze. /compact still works.
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.
DISABLE_COMPACT
Set to 1, it turns off all compaction, /compact too.
DISABLE_COMPACT set to 1 turns off all compaction. The auto squeeze stops. The /compact command stops too. A long chat then runs until it hits the model's limit. It is stricter than DISABLE_AUTO_COMPACT.
In one line
- DISABLE_AUTO_COMPACT
- Set to 1, it stops the automatic squeeze. /compact still works.
- DISABLE_COMPACT
- Set to 1, it turns off all compaction, /compact too.