Skip to content
BENIBIX Learn

/autocompact Command

Also known as /autocompact, Auto-compact window, claude --autocompact

It sets when the chat is squeezed on its own.

Think of it like

It is like you pick how full the bin gets. Then you take it out.

Example

Jack's model has a very large window, but he wants a summary sooner. He sets /autocompact 500k. Now the chat is squeezed long before it is full.

Why it matters

It sets how much of the chat is kept word for word, and when the rest is cut short.

Definition

/autocompact sets how full the context gets before Claude Code compacts it on its own. Pass a size such as 500k, or auto to go back to the size tuned for your model. Without a size, it shows the size now in use. The value is saved in your user settings and works in this session at once.

Example code

console
/autocompact 500k
Compact on its own once the context reaches 500k tokens.
The line near the end of the grid is the point /autocompact moves.

Common mistake

Thinking it compacts the chat now. It only sets the point where compaction starts. /compact is the one that squeezes it now.

Key takeaways

  1. 1
    Sets the point. Where compaction starts.
  2. 2
    A size or auto. Such as 500k.
  3. 3
    Saved for later. In user settings.

Learn it properly