Command

/compact

Summarise the conversation and reset context to a smaller working set.

Install

manual
/compact

Add this to your Claude Code MCP settings or run via the CLI.

About

Forces Claude to compact its current context — useful when you want to keep going but the context is bloating. Built-in command.

Common use cases

  • Long session getting slow
  • Switching task within a session
  • Free up token budget

Tags

contextsessionbuilt-in