Command

/compact

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

安裝

manual
/compact

把這段加入 Claude Code MCP 設定,或直接透過 CLI 執行。

介紹

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

常見使用情境

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

標籤

contextsessionbuilt-in