Session 4
Slash commands & managing context
Goal. Drive a session with slash commands and keep the context window small so Claude stays fast and cheap.
- 1Type
/to see all commands. Essentials:/help,/clear(start fresh between unrelated tasks),/resume(return to a past session), and/rewindor double-tap Escape (restore code and conversation to an earlier checkpoint). - 2Watch context with
/contextand/usage. When switching to unrelated work,/clear— stale context wastes tokens on every message. Use/compact Focus on test outputto summarize while keeping what matters. - 3Shortcuts: Tab completes commands, ↑ recalls history, Shift+Tab cycles permission modes.
You'll see. A session you steer deliberately — clearing between tasks, rewinding a bad change, and keeping the context lean.
Cost. /clear and /compact directly cut token use; /usage shows where your tokens go (skills, subagents, MCP servers).
Takeaway. A few slash commands — /clear, /rewind, /compact, /usage — keep long sessions fast, recoverable, and affordable.