Skip to content
BENIBIX Learn

/clear vs /compact

People often think /clear and /compact both just make room. They keep very different things. /compact squeezes the chat into a summary, so Claude still knows what you were doing. /clear starts a new chat with an empty context, so Claude knows nothing of it. Use /compact to go on with the same task. Use /clear to start a new one.

AI⌨️ Claude Code

/clear Command

It starts a new chat with an empty context.

/clear starts a new conversation with an empty context, so Claude no longer sees the chat so far. CLAUDE.md and your project memory still load. The old conversation is saved, so /resume can bring it back. Pass a name to label the old one in the /resume list. It is the cleanest way to switch to a new task.

Example
Jack fixed a login bug and now wants to work on the footer. He types /clear, so the long talk about login no longer fills the window.
Why it matters
Old chat about a finished task uses up room and can pull Claude off track. A clean start keeps it focused.
Full entry
AI⌨️ Claude Code

Auto-Compact

Claude Code sums up an old chat to make room.

Auto-compact is how Claude Code makes room when a session's context window is nearly full. It writes a short summary of the chat so far. Then it carries on from that summary. Your CLAUDE.md and your auto memory are loaded again after it. But a rule you only gave in the chat may get lost. You can also run /compact yourself, and say what to keep.

Example
Jack has worked for three hours in one session. The context is nearly full, so Claude Code sums up the work so far and keeps going.
Why it matters
It lets a long job keep going after the context is full.
Full entry

In one line

/clear Command
It starts a new chat with an empty context.
Auto-Compact
Claude Code sums up an old chat to make room.