Claude Code Interactive Mode Reference
Shortcuts, modes, and commands inside the Claude Code prompt that most users never find.
Problem: Most Claude Code users type a prompt, hit Enter, wait, and repeat. That loop ignores a pile of built-in features. A two-key combo can kill a runaway sub-agent. A side channel can ask Claude a quick question without touching history. A real vim editor lives inside the input. A bash mode runs shell commands and feeds the output back into the same conversation. None of this is in one place, so most of the speed sits unused.
Quick Win: Open any Claude Code session and hit Ctrl+F. Tap it again within three seconds to confirm. Every background agent stops. If a sub-agent has ever burned tokens while you watched, that single shortcut earns its keep. Or fire /btw mid-response to slip in a question without rewriting the conversation history.
# Kill all background agents instantly
Ctrl+F
# Ask a side question while Claude is working
/btw what file was that error in?
# Toggle vim mode for full modal editing
/vimInteractive mode is more than a chat box. It is a full terminal app with modes, shortcuts, quick commands, and workflow helpers that rarely show up in tutorials. If your days run through Claude Code, these features decide whether the interface gets in your way or gets out of it. Never worked in the terminal before? Start with the terminal-first development model for the mental picture of how Claude Code runs code.
/btw: Side Questions That Don't Touch History
/btw is the newest addition and it fixes a real pain point. You ask Claude something, and the exchange stays out of the conversation history. The answer never lands in the context window. What Claude "knows" about your session does not change.
The twist: /btw fires while Claude is still producing a response. You do not have to wait for the stream to finish. Type /btw, ask, get an answer, and the main reply keeps flowing.
# While Claude is mid-response:
/btw which test file covers the auth middleware?
# Quick clarification without polluting context:
/btw what's the difference between useEffect and useLayoutEffect?
# Check something without derailing the current task:
/btw did we already update the error types in types.ts?Think of /btw as the opposite of a sub-agent. A sub-agent gets every tool but starts blank. /btw gets the whole conversation but no tools. It answers from what Claude already sees in your session. No reads, no searches, no code runs. A quick reply drawn from the context already in play.
Key constraints:
- One response per call. No follow-ups inside a single
/btwthread. - Zero tool access. Answers come from context only.
- Cheap. The prompt cache gets reused, so token cost stays tiny.
- Close with Space, Enter, or Escape and go back to your work.
The feature came out of a side project by Erik Schluntz on the Claude Code team. Claude Code lead Thariq Shihipar announced it on March 11, 2026. That tweet cleared 2.2M views. Months of requests for a way to "ask a question without derailing context" had been sitting unanswered. This is the answer.
/btw shines during long-running jobs. When Claude is refactoring a big module and a question pops up, there is no need to cancel the run, ask, and re-prompt from zero. Fire /btw and keep moving.
Keyboard Shortcuts That Actually Matter
Dozens of shortcuts ship with Claude Code. Instead of an alphabetical dump, here are the ones grouped by the moment you actually want them.
macOS users: Anything using Alt (such as Alt+P, Alt+T, Alt+B, Alt+F) needs Option configured as Meta in your terminal. In iTerm2, open Settings, Profiles, Keys and set Left/Right Option to "Esc+". In Terminal.app, tick "Use Option as Meta Key" under Profiles, Keyboard. Run /terminal-setup if you are not sure what you have.
Session Control
| Shortcut | What It Does | When You Need It |
|---|---|---|
Ctrl+C | Cancel current response | Claude is going down the wrong path |
Ctrl+F | Kill all background agents (press twice to confirm) | A sub-agent is burning tokens |
Ctrl+D | Exit Claude Code | Done with the session |
Ctrl+L | Clear screen | Terminal is cluttered |
Esc Esc | Rewind or summarize from any point | Claude made a mistake, undo it |
Double-tap Esc Esc is the sleeper move. It rolls code and conversation back to an earlier point, or builds a summary from a chosen message. Far better than Ctrl+C when the goal is undo, not stop.
Input and Navigation
| Shortcut | What It Does | When You Need It |
|---|---|---|
Up/Down arrows | Scroll through prompt history | Re-running a previous prompt |
Ctrl+R | Reverse search through history | Finding a specific past prompt |
Ctrl+G | Open external text editor | Writing a long, complex prompt |
Ctrl+V / Cmd+V | Paste image from clipboard | Sharing screenshots for debugging |
Shift+Tab or Alt+M | Toggle permission modes | Switching between plan/auto-accept/normal |
Ctrl+G pops open whatever sits in $EDITOR. A lifesaver for multi-paragraph prompts that feel cramped in a single-line input. Write it in a proper editor, save, close, and it sends. Already shaping a CLAUDE.md for project context? Dense prompts earn the same editor treatment.
Model and Thinking Controls
| Shortcut | What It Does | When You Need It |
|---|---|---|
Alt+P | Switch model | Changing between Sonnet and Opus mid-session |
Alt+T | Toggle extended thinking | Enabling deep reasoning for complex problems |
Ctrl+O | Toggle verbose output | Seeing full tool call details |
Ctrl+T | Toggle task list | Tracking multi-step work |
Ctrl+B | Background the current task | Moving a long response to the background |
Alt+T deserves a call-out. On a hard reasoning job, flipping extended thinking on mid-session changes how Claude attacks the problem. No new session, no config edit. Toggle when the work wants deeper analysis.
Text Editing in the Input
These run on the prompt line before you send:
| Shortcut | What It Does |
|---|---|
Ctrl+K | Delete from cursor to end of line |
Ctrl+U | Delete entire line |
Ctrl+Y | Paste last deleted text |
Alt+Y | Cycle through paste history |
Alt+B | Move cursor back one word |
Alt+F | Move cursor forward one word |
Want to go further with shortcut tuning? The keybindings system lets every shortcut get remapped from one JSON file.
Multiline Input
Default input is a single line, but four tricks write multiline prompts without jumping to Ctrl+G:
- Backslash + Enter: End a line with
\, then hit Enter. The prompt carries onto the next line. - Option+Enter (macOS) or Shift+Enter: Drops in a newline without sending.
- Ctrl+J: Drops in a newline inside the input.
- Paste mode: Pasting multi-line text from the clipboard flips into multi-line on its own.
For really long prompts, Ctrl+G and a full editor still wins. For a quick two or three lines, \ + Enter is the fastest path.
Quick Commands: /, !, and @
Three prefix characters turn on different input modes without a named slash command.
/ for Slash Commands and Skills
Hit / to pull up every available command and custom skill in your project. The list filters as you type. That is the door to everything from /compact (compress context) to /diff (view recent changes) to /theme (change syntax highlighting).
! for Bash Mode
Start a line with ! and anything after it runs as a shell command with full conversation context. This is different from Claude running bash on your behalf. When you type ! git log --oneline -5, the shell runs the command right then, and the output drops into the conversation.
# Run git commands without leaving the session
! git status
# Check file contents
! cat src/config.ts
# Run tests
! npm test
# Tab autocomplete works from ! history
! npm <Tab>Bash mode hangs on to conversation context. If Claude suggested a command and you want to tweak it, type ! and go. The output feeds straight back into Claude's context, so a follow-up like "now fix the errors from that test run" works because Claude saw the run.
@ for File Path Mentions
Start a token with @ and a path to point at a specific file in your prompt. It tells Claude exactly where to look, pinning intent. Tab completion works on paths after @.
The Slash Command Reference
A generous pile of built-in slash commands ships with the product. Here they are grouped by job, with short notes on when each one earns its place.
Session Management
| Command | Purpose |
|---|---|
/add-dir | Add a new working directory to the current session |
/clear | Reset conversation history (also resets per-directory command history) |
/compact | Compress context to free up token space |
/exit | Exit Claude Code |
/fork | Branch conversation into a new session |
/resume | Resume a previous session |
/rename | Rename current session |
/rewind | Undo the last turn |
Long sessions live or die by /compact. When the context window fills, /compact rolls the conversation into a summary and gives the space back. For extended work, run it on purpose before the ceiling, not after the automatic squeeze kicks in.
Information and Status
| Command | Purpose |
|---|---|
/cost | Show token usage and cost for this session |
/usage | Show plan usage and rate limits |
/extra-usage | Configure extra usage when rate-limited |
/stats | Show session statistics |
/status | Show account status |
/diff | Show recent file changes |
/doctor | Diagnose common configuration issues |
/keybindings | Open or create keybindings config file |
/release-notes | Show latest release notes |
Configuration
| Command | Purpose |
|---|---|
/config | Open settings |
/context | Visualize context usage as a colored grid |
/init | Initialize Claude Code in a project |
/memory | Edit CLAUDE.md memory file |
/model | Switch the active model |
/permissions | Manage tool permissions |
/theme | Change syntax highlighting and display theme |
/statusline | Configure the terminal status line |
/terminal-setup | Configure terminal integration |
/privacy-settings | Manage privacy preferences |
/vim | Toggle vim editing mode |
Tools and Integrations
| Command | Purpose |
|---|---|
/mcp | Manage MCP server connections |
/hooks | Manage automation hooks |
/ide | Connect to IDE integration |
/chrome | Connect to Chrome for browser automation |
/desktop | Connect to Claude Desktop |
/mobile | Show QR code to download Claude mobile |
/plugin | Manage plugins |
/reload-plugins | Reload all plugins |
Collaboration
| Command | Purpose |
|---|---|
/agents | Manage running sub-agents |
/tasks | View and manage task list |
/plan | Enter planning mode |
/sandbox | Run in isolated sandbox |
/pr-comments | Fetch comments from a GitHub PR |
/remote-control | Enable remote control |
/remote-env | Manage remote environments |
/security-review | Analyze branch changes for security vulnerabilities |
/stickers | Order physical Claude Code stickers |
Account
| Command | Purpose |
|---|---|
/login | Log in to your Anthropic account |
/logout | Log out |
/upgrade | Upgrade your plan |
/install-github-app | Install the GitHub integration |
/install-slack-app | Install the Slack integration |
/fast | Toggle fast mode (same model, faster output) |
/feedback | Send feedback to Anthropic |
/export | Export conversation |
/copy | Copy last response to clipboard |
/passes | Share free weeks of Claude Code with friends |
/skills | View available skills |
/insights | View conversation insights |
/help | Show help |
The New /btw Command
| Command | Purpose |
|---|---|
/btw | Ask a side question without affecting conversation history |
Covered up top. This is the flagship add from the March 2026 release.
One note on deprecations: /review is gone. If that was your code review path, the /simplify command replaces it and runs a three-agent parallel review instead.
Vim Mode: Full Modal Editing in the Input
Type /vim and the prompt switches to vim keybindings. This is not a watered-down emulator. You get mode switching (Normal and Insert), navigation (h/j/k/l, w/b/e, 0/$, f/F/t/T character jumps), editing operators (d, c, y, p), and text objects (iw, aw, i", a().
For anyone who lives in vim or neovim, the context switch between editor and prompt goes away. The same muscle memory you use on code now drives your prompts.
Vim operations available:
| Category | Commands |
|---|---|
| Mode switching | i, I, a, A, o, O, Esc |
| Navigation | h, j, k, l, w, b, e, 0, $, ^, gg, G |
| Character jump | f{char}, F{char}, t{char}, T{char}, ;, , |
| Editing | d, dd, D, c, cc, C, x, J, ., >>, << |
| Text objects | iw, aw, iW, aW, i", a", i(, a(, i{, a{ |
| Clipboard | y, yy, p, P |
Run /vim again to turn it off. The setting sticks across prompts inside one session but resets on a fresh start.
Background Tasks with Ctrl+B
A long response does not need your eyes on it. Hit Ctrl+B to shove the current task into the background. (Tmux users: tap Ctrl+B twice, since tmux already claims the prefix.) Claude keeps working. The prompt comes back so another job can start, or a shell command can run.
Background task behavior:
- Output buffers while hidden and prints when you come back.
- Several tasks can run side by side.
Ctrl+Fkills every background agent when something breaks.- The task list (
Ctrl+T) surfaces background status.
A clean pair with the terminal-first model where you play scheduler across parallel streams of work. Send a big refactor to the background, take a bug fix in the foreground, and circle back when the refactor wraps.
Good moments to background a task:
- Long code generation that is known to take minutes
- Test suite runs while real work happens in another prompt
- Research jobs where Claude is opening many files
- Anything where watching the stream adds zero value
Prompt Suggestions
Prompt suggestions get auto-generated from your git history and the running conversation. You see them below the input, and Tab accepts one.
They land well after git operations. If a commit just went in, Claude might suggest "write tests for the changes in the last commit." With a dirty tree, it might offer "review the current diff for issues." Suggestions reuse the cache, so the extra cost per session is tiny.
They also sharpen as you chat. Early on they lean on git state. A few exchanges in, they pull from the conversation and offer logical next steps based on what is already happening.
Command History
Every prompt you type goes into per-directory command history. Up and Down arrows walk through old prompts, or Ctrl+R runs a reverse incremental search (type a fragment and it pulls matching past prompts).
Two things to know:
- History is per-directory. Each project keeps its own list. That stops cross-project prompt leakage.
/clearresets history. Clearing conversation wipes the command history for that directory too. Want to keep the old prompts around? Run/compactinstead of/clear.
Task List
Ctrl+T toggles the task list overlay. It tracks multi-step work in a session, showing what is done, what is running, and what is queued. The task list survives context compactions, so even after a summary pass, the task tracking sticks around.
For team workflows, set the CLAUDE_CODE_TASK_LIST_ID environment variable so several Claude Code sessions share one task list. Handy when parallel sessions carve up the same project and one pane of progress helps.
PR Review Status
Working on a branch with an open pull request? Claude Code prints the PR status in the footer. A colored underline on the PR link shows review state at a glance:
| Color | Status |
|---|---|
| Green | Approved |
| Yellow | Review pending |
| Red | Changes requested |
| Gray | Draft PR |
| Purple | Merged |
Auto-refreshes every 60 seconds. No browser tab flip to check whether a PR is approved. You see it right in the terminal as the work goes on. Requires the gh CLI installed and logged in (gh auth login).
Combining Features for Real Workflows
These pieces get stronger when they stack. Here are patterns that click together.
Deep work with background tasks and /btw: Send a big implementation into the background with Ctrl+B. While it runs, fire /btw for quick codebase questions that would otherwise clutter the main task's context. Check progress with Ctrl+T.
Rapid iteration with bash mode and fast mode: Flip fast mode on for quick replies, run tests between iterations with !, and reach for Ctrl+R to pull old prompts you want to tweak and re-run. The whole loop between prompting, testing, and adjusting gets shorter.
Careful work with planning mode and vim input: Drop into planning mode for analysis, write tight prompts under vim mode for editing comfort, read the plan, leave planning mode, and hand execution to Claude. For very long instructions, Ctrl+G opens the full editor.
Multi-agent coordination with task list and agents: /agents lists running sub-agents, Ctrl+T tracks their tasks, Ctrl+F kills any that drift, and /btw asks about them without breaking the main thread.
Next Steps
- Walk through the keybindings system to remap any shortcut to the muscle memory you already own
- Read up on planning mode for splitting thinking from execution
- Take in the terminal-first model to see how these features slot together
- Give voice mode a spin for a mix of typed and spoken input
- Check /simplify and /batch for bundled multi-agent workflows
- Read the context management guide for keeping long sessions efficient
Interactive mode marks the line between a tool for writing code and a full development environment. Side questions through /btw, modal editing under vim mode, background jobs, fast mode flips. None of these are optional polish. Together they shape the interface that keeps long sessions out of grinding territory. Pick the shortcuts that fit your flow, drop the ones that do not, and swing back through this page whenever a friction point smells like it deserves a keystroke. It usually does.
Stop configuring. Start building.