Who this is for
People who already run Claude Code and talk to it in the terminal every day. After reading, you can use the shortcuts you need most, run shell commands with !, ask side questions with /btw without adding them to the history, queue messages while Claude works, and fix Option-key shortcuts that do not respond on macOS.
What it is
Interactive mode is the session where you type into the terminal and Claude Code replies as it works. It comes with a set of shortcuts for editing the input, interrupting a response, switching permission modes and models, and inspecting tool calls. The exact keys can vary by platform and terminal.[1]
Setup
- Make sure
clauderuns in your terminal and that you are signed in. - On a Mac, the Option-key shortcuts that appear as
Alt+B,Alt+F,Alt+D,Alt+YandAlt+Pneed Option set as the Meta key in your terminal first.Option+Tworks on macOS without that setting.[1]
Editing and input
- New lines:
\followed byEnterworks in all terminals.Ctrl+Jworks in any terminal without configuration, andShift+Enteris native in iTerm2, WezTerm, Ghostty, Kitty, Warp and Windows Terminal.[1] - Deleting and pasting:
Ctrl+Kdeletes to the end of the line andCtrl+Udeletes to the start. Deleted text is stored, andCtrl+Ypastes back the text you last deleted.[1] - Prefixes:
/at the start opens commands and skills,@triggers file path autocomplete, and!at the start enters shell mode.[1] - History:
Uprecalls earlier prompts, including prompts from past sessions in the same project, because input history is stored per working directory.[1] Ctrl+Rsearches previous commands in reverse.[1]
Getting started
- Try shell mode first. Start the input with
!and the command runs directly, for example:[1]
! npm test
! git status
! ls -la- The command and its output go into the conversation context, and Claude responds to the output automatically, so you do not need a second prompt. To leave shell mode, press
Escape,BackspaceorCtrl+Uon an empty prompt.[1] - To ask something without leaving it in the history, use
/btw. It answers from what is already in the conversation and cannot read files, run commands or search.[1] - Keep typing while Claude is busy. Pressing
Enterqueues the message rather than interrupting the turn, and queued entries stay listed until they are sent. To send them immediately, pressCtrl+EnterorCtrl+X Ctrl+S;Ctrl+Enterrequires Claude Code v2.1.275 or later.[1] - To take queued messages back, press
Upfrom the first line of the input box. They return to the input box.[1]
Interrupting, clearing and stashing
Ctrl+Cinterrupts a running operation. When nothing is running, the first press clears the input and a second press exits Claude Code.[1]Escstops the current response or tool call mid-turn so you can redirect Claude. The work already done is kept.[1]- With text in the input, double
Escclears it and saves the draft to history. With an empty input, doubleEscopens the rewind menu.[1] - A draft cleared with
Ctrl+Ccan be recovered. Right after clearing, with the prompt still empty, pressUp; this requires v2.1.288 or later. After you send a message,Upcan still step back to the draft, and Claude Code keeps the ten most recent cleared drafts for the session.[1] Ctrl+Sstashes the prompt when it has text. Pressed again on an empty prompt, it restores the stashed text, pasted content and input mode.[1]Ctrl+Lforces a full redraw while keeping input and history, which helps when the display is garbled.[1]
Permissions, models and details
Shift+Tabcycles the permission modes:default(shown as Manual in the mode indicator),acceptEditsandplan, thenbypassPermissionsandautowhere available.[1]Option+P(Alt+Pon Windows and Linux) switches models without clearing the prompt.[1]Option+O(Alt+Oon Windows and Linux) toggles fast mode.[1]Ctrl+Oopens the transcript viewer, which shows detailed tool usage with a timestamp and the model used for each assistant message.[1]/diffshows the changes in the working tree. With fullscreen rendering the diff panel opens beside the conversation; with the classic renderer the diff dialog opens above the prompt.[1]
Common questions
**A shortcut such as Alt+P does nothing on a Mac.** Check that Option is set as the Meta key in your terminal. Option+T does not need that setting. It has no effect on Opus 5.5, Sonnet 5.5, Haiku 5.5 or the Fable models, which always use extended thinking.[1]
A command runs too long. When a command reaches its timeout before finishing, Claude Code moves it to the background instead of stopping it, unless the command starts with sleep.[1]
Next steps
This article covers the most-used keys. For the complete shortcut list, the transcript viewer keys and vim editing mode, use the official interactive mode page.[1]
Sources
- 1Interactive modeAnthropic Claude Code docs
Cite this page: Claude Code interactive mode: shortcuts and tips. TellWorld, https://www.tellworld.net/practice/practice-claude-code-interactive-mode. Updated 2026-11-14