A developer has been coding with Claude Code for 2 hours. Claude is now suggesting patterns it explicitly ruled out an hour ago. The developer runs /compact. What does /compact do?
Answer: Distills the session conversation history into a compact summary, replacing the full history with the distilled version while preserving key context
/compact triggers a summarization pass that replaces the full conversation history with a distilled summary. Key context — current task state, key decisions, important code snippets — is preserved. Intermediate reasoning, dead ends, and redundant explanation are discarded. The session continues from the summary, typically at a much lower token count. /compact does not clear the session (A) — critical context is preserved in the summary. It does not persist to memory for future sessions (B) — that requires /remember. It's a semantic distillation, not whitespace compression (D).