/resume
Restores a previous conversation session, picking up where you left off./resume displays a scrollable list of previous conversations for the current repository. You can toggle between showing only same-repo sessions and all projects with a keystroke.
Sessions are stored as log files on disk. Each session is identified by a UUID. The picker shows the session’s first message, timestamp, and — when custom titles are enabled — a human-readable title.
Resuming from a different directory
If you select a session that originated in a different directory, Claude Code will not resume it directly. Instead it copies the correct claude --resume <session-id> command to your clipboard and displays it so you can run it from the right working directory.
Sessions from git worktrees within the same repository can be resumed directly regardless of the current working directory.
/compact
Compresses the current conversation history into a summary, freeing up context window space.Use
/compact when you see a warning that you are approaching the context limit, or proactively on long-running sessions to reduce cost.ctrl+o to view the full summary.
/share
Shares the current session. Feature availability depends on your account type./share availability varies by account. The command may be hidden or disabled depending on your subscription and organization settings./clear
Clears the current conversation history and frees up context./reset, /new
Unlike /compact, which replaces history with a summary, /clear removes all conversation history entirely. This is equivalent to starting a fresh session. Your files on disk are not affected.
/exit
Exits the Claude Code REPL./quit
/context
Visualizes how much of the current context window is in use, rendered as a colored grid./compact or /clear.
In non-interactive (headless) mode, /context outputs a plain text summary of context usage instead of the grid.
/cost
Shows the total token usage and estimated cost for the current session./cost is hidden for claude.ai subscribers, since they are billed through their subscription rather than per-token. The command is still visible for API key users./cost will indicate that rather than showing a dollar amount.
/tasks
Lists and manages background tasks running in the current session./bashes
Background tasks are long-running shell commands or sub-agents that Claude Code spawned during the current session. /tasks opens a panel where you can view their status and output.