โ† Back

Controlling Context in Claude Code

๐Ÿ“– See also: Glossary: Claude Code Building Blocks for a full breakdown of all the pieces (skills, hooks, subagents, MCP, plugins, etc.)

Four shortcuts that change how you manage a session โ€” and they're all doing different things.

Escape interrupts Claude mid-run. Useful when it's going in the wrong direction and you need to redirect before it does more damage.

Double-tap Escape rewinds the conversation to an earlier point. Not just stopping โ€” actually going back. Good for when you realize a few steps ago is where things went wrong.

/compact summarizes the conversation and continues. Claude keeps what it learned but the context window gets lighter. The middle ground between starting over and letting it bloat.

/clear dumps everything. Clean slate. Best when switching between unrelated tasks and you don't want the previous context bleeding in. Four levels of reset, basically. From "pause" to "full wipe."