Reducing Claude Code context usage without losing findings
CCAR-FContext Management & ReliabilityMediumQuestion 16 of 59
You are conducting an extensive architectural investigation across a large codebase using Claude Code. Over dozens of turns, the conversation history accumulates hundreds of thousands of tokens of superseded search outputs, directory listings, and file contents, causing latency to degrade as the context window approaches its capacity limit. You need to reduce token consumption and continue the investigation without losing critical findings from earlier analysis.
Which command should you execute to reduce context window usage while preserving session progress?
Show answer and explanation
DExecute /compact with focus instructions to summarize the conversation history and free context window capacity.
The /compact command summarizes the conversation history up to the current turn to fit within the context window, freeing tokens while preserving key architectural findings. Developers can optionally provide focus instructions to guide which details the summary retains. Running /clear completely erases conversation history, forcing developers to restart investigation from scratch. Resuming an active session reloads the full transcript without pruning past tool results. The /memory command inspects or edits persistent auto-memory records rather than compacting accumulated session tokens.