Build This Now
Build This Now
What Is Claude Code?Claude Code InstallationClaude Code Native InstallerYour First Claude Code Project
Terminal as Main ThreadClaude Code Interactive Mode ReferenceClaude Code Voice ModeClaude Code Diff ReviewClaude Code Monitor ToolClaude Code Routines
Get Build This Now
speedy_devvkoen_salo
Blog/Handbook/Core/Claude Code Interactive Mode Reference

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
/vim

Interactive 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 /btw thread.
  • 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

ShortcutWhat It DoesWhen You Need It
Ctrl+CCancel current responseClaude is going down the wrong path
Ctrl+FKill all background agents (press twice to confirm)A sub-agent is burning tokens
Ctrl+DExit Claude CodeDone with the session
Ctrl+LClear screenTerminal is cluttered
Esc EscRewind or summarize from any pointClaude 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

ShortcutWhat It DoesWhen You Need It
Up/Down arrowsScroll through prompt historyRe-running a previous prompt
Ctrl+RReverse search through historyFinding a specific past prompt
Ctrl+GOpen external text editorWriting a long, complex prompt
Ctrl+V / Cmd+VPaste image from clipboardSharing screenshots for debugging
Shift+Tab or Alt+MToggle permission modesSwitching 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

ShortcutWhat It DoesWhen You Need It
Alt+PSwitch modelChanging between Sonnet and Opus mid-session
Alt+TToggle extended thinkingEnabling deep reasoning for complex problems
Ctrl+OToggle verbose outputSeeing full tool call details
Ctrl+TToggle task listTracking multi-step work
Ctrl+BBackground the current taskMoving 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:

ShortcutWhat It Does
Ctrl+KDelete from cursor to end of line
Ctrl+UDelete entire line
Ctrl+YPaste last deleted text
Alt+YCycle through paste history
Alt+BMove cursor back one word
Alt+FMove 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

CommandPurpose
/add-dirAdd a new working directory to the current session
/clearReset conversation history (also resets per-directory command history)
/compactCompress context to free up token space
/exitExit Claude Code
/forkBranch conversation into a new session
/resumeResume a previous session
/renameRename current session
/rewindUndo 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

CommandPurpose
/costShow token usage and cost for this session
/usageShow plan usage and rate limits
/extra-usageConfigure extra usage when rate-limited
/statsShow session statistics
/statusShow account status
/diffShow recent file changes
/doctorDiagnose common configuration issues
/keybindingsOpen or create keybindings config file
/release-notesShow latest release notes

Configuration

CommandPurpose
/configOpen settings
/contextVisualize context usage as a colored grid
/initInitialize Claude Code in a project
/memoryEdit CLAUDE.md memory file
/modelSwitch the active model
/permissionsManage tool permissions
/themeChange syntax highlighting and display theme
/statuslineConfigure the terminal status line
/terminal-setupConfigure terminal integration
/privacy-settingsManage privacy preferences
/vimToggle vim editing mode

Tools and Integrations

CommandPurpose
/mcpManage MCP server connections
/hooksManage automation hooks
/ideConnect to IDE integration
/chromeConnect to Chrome for browser automation
/desktopConnect to Claude Desktop
/mobileShow QR code to download Claude mobile
/pluginManage plugins
/reload-pluginsReload all plugins

Collaboration

CommandPurpose
/agentsManage running sub-agents
/tasksView and manage task list
/planEnter planning mode
/sandboxRun in isolated sandbox
/pr-commentsFetch comments from a GitHub PR
/remote-controlEnable remote control
/remote-envManage remote environments
/security-reviewAnalyze branch changes for security vulnerabilities
/stickersOrder physical Claude Code stickers

Account

CommandPurpose
/loginLog in to your Anthropic account
/logoutLog out
/upgradeUpgrade your plan
/install-github-appInstall the GitHub integration
/install-slack-appInstall the Slack integration
/fastToggle fast mode (same model, faster output)
/feedbackSend feedback to Anthropic
/exportExport conversation
/copyCopy last response to clipboard
/passesShare free weeks of Claude Code with friends
/skillsView available skills
/insightsView conversation insights
/helpShow help

The New /btw Command

CommandPurpose
/btwAsk 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:

CategoryCommands
Mode switchingi, I, a, A, o, O, Esc
Navigationh, j, k, l, w, b, e, 0, $, ^, gg, G
Character jumpf{char}, F{char}, t{char}, T{char}, ;, ,
Editingd, dd, D, c, cc, C, x, J, ., >>, <<
Text objectsiw, aw, iW, aW, i", a", i(, a(, i{, a{
Clipboardy, 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+F kills 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:

  1. History is per-directory. Each project keeps its own list. That stops cross-project prompt leakage.
  2. /clear resets history. Clearing conversation wipes the command history for that directory too. Want to keep the old prompts around? Run /compact instead 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:

ColorStatus
GreenApproved
YellowReview pending
RedChanges requested
GrayDraft PR
PurpleMerged

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.

More in this guide

  • Agent Fundamentals
    Five ways to build specialized agents in Claude Code, from sub-agents to .claude/agents/ definitions to perspective prompts.
  • Agent Patterns
    Orchestrator, fan-out, validation chain, specialist routing, progressive refinement, and watchdog. Six ways to wire sub-agents in Claude Code.
  • Agent Teams Best Practices
    Battle-tested patterns for Claude Code agent teams. Troubleshooting, limitations, plan mode quirks, and fixes shipped from v2.1.33 through v2.1.45.
  • Agent Teams Controls
    Stop your agent team lead from grabbing implementation work. Configure delegate mode, plan approval, hooks, and CLAUDE.md for teams.
  • Agent Teams Prompt Templates
    Ten tested Agent Teams prompts for Claude Code. Code review, debugging, feature builds, architecture calls, and campaign research. Paste and go.

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

Get Build This Now

Terminal as Main Thread

Run parallel Claude Code sessions across multiple terminals and coordinate them yourself instead of waiting on one.

Claude Code Voice Mode

Hold spacebar, talk, release to transcribe. Claude Code voice mode mixes typed and spoken input in a single prompt with no mode switching.

On this page

/btw: Side Questions That Don't Touch History
Keyboard Shortcuts That Actually Matter
Session Control
Input and Navigation
Model and Thinking Controls
Text Editing in the Input
Multiline Input
Quick Commands: /, !, and @
/ for Slash Commands and Skills
! for Bash Mode
@ for File Path Mentions
The Slash Command Reference
Session Management
Information and Status
Configuration
Tools and Integrations
Collaboration
Account
The New /btw Command
Vim Mode: Full Modal Editing in the Input
Background Tasks with Ctrl+B
Prompt Suggestions
Command History
Task List
PR Review Status
Combining Features for Real Workflows
Next Steps

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

Get Build This Now