Claude Code Sessions: The Complete Operator Guide
Every command, shortcut, and mode inside a Claude Code session. Covers /clear, /compact, /resume, interrupt, plan mode, and the daily workflow.
What a session is
Every time you type claude in your terminal, you start a session. Every time you type /exit or close the window, that session ends. That's it.
A session is one continuous conversation with Claude Code. You type instructions in plain English, Claude reads files, runs searches, writes code, and edits documents. It works in a loop, picking up tools on its own to get the task done, then comes back to you with results.
$ claude
Welcome to Claude Code
Working directory: ~/Documents/acme-project
You: Rewrite the Q3 board deck intro to be more concise
Reading board-deck-q3.md...
Proposed edit to board-deck-q3.md (lines 1-18):
[Shows changes]
Apply changes? (y/n)
Think of it like a working session with a colleague. You give direction, they execute, you review. The difference is Claude has access to every file in your project folder and can read, edit, and create documents without switching between apps. You stay in one place the entire time.
Sessions carry full conversation history. Claude remembers what you discussed, what files you changed, and what decisions you made. That context persists until you exit or clear it.
> The practical limit. Each session has a 200K token context window. For most operator workflows, that covers several hours of back-and-forth before you need to manage context.
Essential session commands
Three slash commands control how your session behaves. Type them directly into the Claude Code prompt.
| Command | What it does | When to deploy it |
|---|---|---|
/clear | Wipes conversation history completely. Fresh start. | Switching to a totally different task mid-session. |
/compact | Clears history but keeps a summary of what happened. | Long sessions where you need to free up context without losing continuity. |
/resume | Shows a list of previous sessions with timestamps. Pick one to continue where you left off. | Starting work the next morning on something you left mid-task. |
/clear is a full reset. Claude forgets everything from the current conversation. Same as closing and reopening Claude Code, except you don't have to navigate back to your project folder. Deploy this when you're done with one task and starting something unrelated.
/compact is the one you'll deploy most. It takes about 35 seconds. Claude reads through the entire conversation, generates a summary of key decisions and context, then wipes the raw history. You keep the important bits without burning through your token budget. Auto-compact kicks in at around 180K tokens (90% of the 200K limit), but you don't have to wait for that. Run it at natural breakpoints: after finishing a deliverable, before switching focus to a different client's work.
/resume makes multi-day work practical. End your session Monday evening, pick it up Tuesday morning. Claude shows you a timestamped list of previous sessions and you choose which one to continue. The context loads back in and you're working again.
$ claude
? Resume a previous session
Today, 2:15 PM - acme-project (board deck rewrites)
Yesterday, 4:30 PM - acme-project (competitor analysis)
Apr 1, 10:00 AM - beacon-co (quarterly report)
Select a session to resume: _
Interrupt and course-correct
This is the most underused feature in Claude Code.
When Claude is mid-task, reading files, running searches, writing edits, you can hit Escape to stop it immediately. Claude pauses, and you can type new instructions right there.
You don't have to wait for Claude to finish something you already know is going in the wrong direction. See it pulling the wrong file? Escape. Writing a section with the wrong tone? Escape. Heading down a rabbit hole you didn't ask for? Escape.
Hit Escape, then redirect. Give new context, correct the approach, or change the task entirely. Claude picks up from your new instruction without losing the rest of the conversation.
[Claude is reading and editing files...]
*press Escape*
Claude paused.
You: Wrong approach. Use the data from q3-results.csv
instead of the annual report.
Reading q3-results.csv...
Deploy this often. The instinct is to let Claude finish and then fix things after. That wastes time and tokens. Interrupting early saves both.
Double-escape opens fork points. Press Escape twice on an empty prompt and Claude shows you a list of previous points in the conversation. Pick any one to jump back to that moment and try a different approach. This is useful when Claude completed a task but you want to retry it with different instructions, without starting over from scratch.
> The difference between Escape and /clear. Escape stops the current action but keeps your full conversation history intact. /clear erases everything. Use Escape when Claude is going off-track. Use /clear when you want a blank slate.
Three modes: regular, auto-accept, plan
Shift+Tab cycles through three operating modes. Each one changes how much control you have over Claude's actions.
Regular mode is the default. Claude shows you every proposed edit and waits for approval before making changes. You see exactly what will change, line by line, before anything touches your files. This is the right mode for client deliverables where accuracy matters more than speed.
Auto-accept mode turns the prompt text purple. Claude makes all edits without asking permission. It reads, writes, creates, and modifies files autonomously. This is faster but riskier. Claude can go several steps in the wrong direction before you notice. Deploy this for tasks where the stakes are low: reorganizing notes, generating first drafts you plan to rewrite anyway, or bulk file operations where precision isn't critical.
Plan mode is the opposite of auto-accept. Claude reads files and runs searches but writes nothing. No edits, no new files, no changes. It researches and produces a written plan for your approval. You review the plan, adjust it, and then switch back to regular mode to execute.
| Mode | Prompt color | Claude can edit files? | Best for |
|---|---|---|---|
| Regular | Default | Yes, with your approval | Client-ready deliverables, careful work |
| Auto-accept | Purple | Yes, without asking | Low-stakes drafts, bulk operations |
| Plan | Default | No, read-only | Research, strategy, unfamiliar tasks |
For client engagements, start in plan mode. Have Claude research the files, outline its approach, and present a plan. Review it. Then switch to regular mode and let it execute with your approval at each step. This two-pass workflow catches mistakes before they happen.
> Recovering from auto-accept gone wrong. If Claude makes unwanted changes, run git diff to see what changed and git checkout . to undo everything. Version control matters even for non-code projects.
Keyboard shortcuts that matter
Five shortcuts handle 90% of what you need beyond typing prompts.
| Shortcut | What it does |
|---|---|
| Escape | Stops Claude mid-task. Lets you redirect immediately. |
| Escape, Escape | On empty prompt: shows fork points to jump back in conversation history. |
| Shift+Tab | Cycles between Regular, Auto-accept, and Plan modes. |
| Ctrl+R | Toggles expanded view of tool use. See exactly which files Claude reads, which searches it runs, what commands it executes. |
| ! (exclamation mark) | Enters bash mode (pink text). Run terminal commands directly without sending them to Claude. |
Ctrl+R is your visibility toggle. By default, Claude shows a condensed view of its work. Toggle Ctrl+R on and you see every file read, every search query, every tool call in real time. Toggle it off when the detail becomes noise. Useful for debugging when Claude produces unexpected results and you want to trace its reasoning.
Bash mode with ! keeps you in one window. Type ! and your prompt turns pink. Whatever you type next runs as a terminal command, not as a message to Claude. Install a package, check git status, run a script, all without leaving the session. Press Enter to execute, and you're back to talking to Claude.
You: ! git status
On branch main
Changes not staged for commit:
modified: board-deck-q3.md
You: Commit that file with the message
"Updated Q3 board deck intro"
No switching between terminal windows. No losing your place. The workflow stays in one screen.
Session workflow for operators
Here is how these pieces fit together for daily fractional work.
Morning startup. Open your terminal, navigate to the client folder, type claude. If you left work mid-task yesterday, use /resume to pick up where you stopped. Your context loads back in and you're productive within seconds.
Working through a deliverable. Start in plan mode (Shift+Tab twice) for anything new or complex. Have Claude read relevant files and outline its approach. Review the plan. Switch to regular mode (Shift+Tab) and execute. Approve edits as they come. Hit Escape the moment something looks wrong.
Switching between clients. Finish the current task, run /compact to preserve a summary, then /clear to reset. Navigate to the next client folder and start fresh. Or open a second terminal tab and run a separate session. Each tab is its own independent session.
End of day. Type /exit. Tomorrow, /resume brings you back. The session list shows which project folder each session ran in and when, so you won't confuse client work.
The pattern that works:
1. /resume or start fresh 2. Plan mode for research and strategy 3. Regular mode for execution 4. Escape to course-correct early 5. /compact at logical breaks 6. /exit when done
The keyboard shortcuts become muscle memory within a few sessions. The real shift is treating Claude Code like a working session with a teammate, not a chatbot you query one prompt at a time.