modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -335,7 +335,7 @@ * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code uses the new model from the next request it makes in that turn * `/effort`: the next message you send runs at the new level. To [start it in the turn Claude is already working on](</docs/en/model-config#when-a-new-effort-level-starts>), queue a message while Claude is running tool calls - * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If your current model doesn’t support fast mode, turning it on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), and Claude Code uses the new model from its next request in that turn + * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If turning fast mode on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), Claude Code uses the new model from its next request in that turn ### Background a session with messages queued @@ -415,7 +415,7 @@ * **Knew this already** : closes the note and marks the topic as known. * **Dismiss** : closes the note. -The main agent doesn’t see a note unless you send it with **Chat in main session**. Claude Code keeps your recent notes and the topics you marked as known in a file whose name starts with `cc-plugin-you-should-know` under `~/.claude/plugins/store/`. Each check, in this session and later ones, lists them to the side agent as ones not to repeat. Claude Code deletes the file once it has gone [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) without a session reading or writing it. To clear them sooner, delete that file while no session is running. +The main agent doesn’t see a note unless you send it with **Chat in main session**. Claude Code keeps your recent notes and the topics you marked as known in a file whose name starts with `cc-plugin-you-should-know` under `~/.claude/plugins/store/`. Claude Code deletes the file once no session has read or written it for the number of days in the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. To clear the notes and topics sooner, delete that file while no session is running. ### Turn off You should know @@ -542,7 +542,7 @@ The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: * **Jump to a file** : click its row in the list. Scroll the panel with the mouse wheel. When the file list itself is too long to fit, scroll it with `Alt+Up` and `Alt+Down`, or `Ctrl+Up` and `Ctrl+Down`. - * **Ask Claude about a file’s changes** : click `ask`, at the right of the file’s name above its diff. Claude Code attaches that file’s diff to your next prompt, and the button reads `asked ✓` until you send that prompt. Asking on a second file replaces the first. + * **Ask Claude about a file’s changes** : in the `Current` view, click the `ask` button at the right of the file’s name above its diff. Your next prompt includes that file’s diff, and the button reads `asked ✓` until you send that prompt. If you ask about another file, that file’s diff replaces the first. * **Show one turn’s edits** : click the `source` picker in the panel’s header, then choose a turn with `Up` and `Down` and press `Enter`. Turns are labeled `T1`, `T2`, and so on. The picker appears once Claude has edited files, and `Current` returns you to the working tree. * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each repository. @@ -556,7 +556,7 @@ * **Up and Down** : select a file. * **Enter** : open the selected file’s diff. Scroll it with Up and Down, or PageUp and PageDown. * **Esc** : return from a file’s diff to the list, or close the dialog from the list. - * **Tab** : move to the `source` picker, then choose `Current` or a turn view with Up and Down and press Enter. In a file’s diff, Tab moves to the `ask` button. Press Enter to attach that file’s diff to your next prompt. + * **Tab** : move to the `source` picker, then choose the `Current` view or a turn view with Up and Down and press Enter. In a file’s diff in the `Current` view, press Tab until the `ask` button is highlighted. Press Enter to attach that file’s diff to your next prompt. ## Side questions with /btw
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -435,7 +435,7 @@ ## Check spelling as you type -Claude Code can underline misspelled words in the prompt input while you type. It checks only the text in the input box, never Claude’s replies or your files. It also checks nothing while the input box is in shell mode, `Ctrl+R` history search, or [voice dictation](</docs/en/voice-dictation>). Spell checking is off by default, and Claude Code checks nothing in [screen reader mode](</docs/en/accessibility>). Requires Claude Code v2.1.235 or later. +Claude Code can underline misspelled words in the prompt input while you type. It checks only the text in the input box, never Claude’s replies or your files. It also checks nothing while the input box is in shell mode, `Ctrl+R` history search, or [voice dictation](</docs/en/voice-dictation>). Spell checking is off by default, and Claude Code checks nothing in [screen reader mode](</docs/en/accessibility>). ### Prerequisites
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -566,7 +566,7 @@ Claude answers a side question from what’s already in the conversation: your messages, its replies, and the tool results it has gathered. You can ask about code Claude has already read, decisions it made earlier, or anything else from the session. A later side question also sees your earlier side questions: Claude Code replays the newest 20 exchanges with each ask, until you clear them. The question and answer never enter the conversation history. In the terminal, they appear in a dismissible overlay. The terminal keeps the thread in memory: press `x` to clear the earlier exchanges, and it’s gone when you exit Claude Code. In the [VS Code extension](</docs/en/vs-code#use-the-prompt-box>)’s chat panel, `/btw` opens a panel rather than the overlay this section describes, and you ask follow-up questions right in the panel. The panel’s thread survives window reloads, on the retention schedule that page describes. You need the extension at v2.1.227 or later. Earlier extension versions don’t offer `/btw`. - * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing. + * **Available while Claude is working** : you can run `/btw` while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing. * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. If Claude writes out tool calls as text anyway, the answer ends with a note that nothing was executed. * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>). * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -609,7 +609,7 @@ Usage limit reached · limit resets 3:45pm Continuing automatically at 3:45pm · Esc to cancel -Either line can carry more after these words, such as a help link on the first or `/usage-credits to continue now` on the second. When the wait starts on its own, the conversation also records it with a line that reads `Usage limit reached · continuing automatically at 3:45pm · esc to cancel`. Keep the session open. What happens next depends on how the wait ends: +Either line can carry more after these words, such as a help link on the first or `/usage-credits to continue now` on the second. Keep the session open. What happens next depends on how the wait ends: * **At the reset** : the second line changes to `Continuing shortly · Esc to cancel`. Then `Usage limit reset · Continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the first line reads `Your usage limit has reset` and the second reads `Press enter to continue`. Press `Enter` to continue. After a shorter sleep, or one that ended before the reset, Claude Code continues on its own.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -22,7 +22,7 @@ `Tab`| Accept an autocomplete suggestion, or add a comment to a permission answer| While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. While a footer item is selected, such as a row in the [subagent panel](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) below the prompt, `Esc` [deselects it](</docs/en/keybindings#footer-actions>) instead of interrupting. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) -`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point +`Esc` \+ `Esc`| Clear input draft, or rewind| Outside vim mode, when the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point. In vim mode, the menu opens from NORMAL mode `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, and `plan`, then `bypassPermissions` and `auto` where available. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option. At the plan approval prompt, it approves the plan `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -398,7 +398,7 @@ /plugin enable cc-plugin-you-should-know@builtin -Where `/plugin` doesn’t list the mod, the enable command answers `Plugin "cc-plugin-you-should-know@builtin" is not installed in this project`. +Where `/plugin` doesn’t list the mod, the enable command says the plugin isn’t installed in this project. ### Cost of checks
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -61,7 +61,7 @@ ---|---|--- Quick escape| `\` \+ `Enter`| Works in all terminals Option key| `Option+Enter`| After enabling [Option as Meta](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) on macOS -Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Windows Terminal. For other terminals, see [Enter multiline prompts](</docs/en/terminal-config#enter-multiline-prompts>) +Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Windows Terminal 1.25 or later. For other terminals, see [Enter multiline prompts](</docs/en/terminal-config#enter-multiline-prompts>) Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -514,7 +514,12 @@ ## Invisible characters in prompts -Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, that Enter sends nothing. The cleaned prompt goes back into the input box with a notice such as `Removed 3 invisible characters · review and press Enter to send`, and pressing Enter again sends the text as shown. When you pass a prompt on the command line, as in `claude "fix the login bug"`, Claude Code doesn’t wait for a second Enter. It removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. +Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, it either sends the cleaned prompt or puts it back for you to review. To tell which, check the notice: + + * **`Removed 3 invisible characters from your prompt`** : if the input box is empty, your prompt was sent without those characters. If the prompt is still there, it wasn’t sent, so press Enter again. + * **`Removed 3 invisible characters · review and press Enter to send`** : nothing was sent. Read the cleaned prompt in the input box, then press Enter to send it as shown. + +When you pass a prompt on the command line, as in `claude "fix the login bug"`, Claude Code removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. ## Review changes with /diff
modified
Show diff (706 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -1,16 +1,8 @@ -## - -​ - -Keyboard shortcuts +## Keyboard shortcuts Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+D`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal. -### - -​ - -General controls +### General controls Shortcut| Description| Context ---|---|--- @@ -32,16 +24,12 @@ `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. While a footer item is selected, such as a row in the [subagent panel](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) below the prompt, `Esc` [deselects it](</docs/en/keybindings#footer-actions>) instead of interrupting. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later -`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option +`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, and `plan`, then `bypassPermissions` and `auto` where available. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option. At the plan approval prompt, it approves the plan `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) -### - -​ - -Text editing +### Text editing Shortcut| Description| Context ---|---|--- @@ -57,43 +45,27 @@ `Alt+D`| Delete to end of word| Deletes to the end of the current word, or to the end of the next word when the cursor is between words. Stores deleted text for pasting. Requires Option as Meta on macOS `Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position -### - -​ - -Word boundaries in editing shortcuts +### Word boundaries in editing shortcuts The word shortcuts `Alt+B`, `Alt+F`, `Alt+D`, `Option+Delete`, and `Ctrl+Backspace` treat a word as a run of letters and digits, so punctuation such as `_`, `.`, and `/` separates words. With `src/utils/foo.ts` in the prompt, repeated presses of `Alt+B` stop at the start of `ts`, `foo`, `utils`, and `src`. `Ctrl+W` is different: it ignores punctuation and deletes back to the previous whitespace, so one press removes all of `src/utils/foo.ts`. In text written without spaces, such as Chinese or Japanese, the word shortcuts still move or delete one word at a time. These readline conventions apply in Claude Code v2.1.261 and later. The [`keybindingFlavor`](</docs/en/settings-reference#keybindingflavor>) setting that turned them on in earlier versions is deprecated and has no effect. You can’t remap these shortcuts in the [keybindings configuration file](</docs/en/keybindings>), which has no actions for them. -### - -​ - -Theme and display +### Theme and display Shortcut| Description| Context ---|---|--- `Ctrl+T`| Toggle syntax highlighting for code blocks| Only works inside the `/theme` picker menu. Controls whether code in Claude’s responses uses syntax coloring -### - -​ - -Multiline input +### Multiline input Method| Shortcut| Context ---|---|--- Quick escape| `\` \+ `Enter`| Works in all terminals Option key| `Option+Enter`| After enabling [Option as Meta](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) on macOS -Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal. For other terminals, see [Enter multiline prompts](</docs/en/terminal-config#enter-multiline-prompts>) +Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Windows Terminal. For other terminals, see [Enter multiline prompts](</docs/en/terminal-config#enter-multiline-prompts>) Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs -### - -​ - -Quick commands +### Quick commands Shortcut| Description| Notes ---|---|--- @@ -103,11 +75,7 @@ `:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes `?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character -### - -​ - -Transcript viewer +### Transcript viewer When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. Run `/tui` with no argument to check which renderer is active. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). @@ -120,29 +88,17 @@ `v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>) `q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>) -### - -​ - -Voice input +### Voice input Shortcut| Description| Notes ---|---|--- Hold or tap `Space`| Voice dictation| Requires [voice dictation](</docs/en/voice-dictation>) to be enabled. Hold to record, or run `/voice tap` for tap-to-toggle. [Rebindable](</docs/en/voice-dictation#rebind-the-dictation-key>) -## - -​ - -Commands +## Commands Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins/overview>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. -### - -​ - -Complete a command mid-prompt +### Complete a command mid-prompt Command completion also works partway through a prompt: type `/` after a space, then the first letters of a name, as in `run the tests, then /com`. Only commands whose names start with those letters match, so a file path such as `/tmp/notes.md` doesn’t keep a list open. Claude Code runs a command itself only when the command [starts your message](</docs/en/commands>). @@ -151,19 +107,11 @@ In both renderers, press `Tab` on a bare mid-prompt `/` to list every command. A plugin skill matches on its bare name too, so `/deploy` finds a skill named `myplugin:deploy-app`. When you insert the match, Claude Code writes the full `/myplugin:deploy-app`. -## - -​ - -Vim editor mode - -Enable vim-style editing via `/config` → Editor mode. Claude Code keeps your vim mode and cursor position when you toggle the transcript viewer with `Ctrl+O` or open and close a panel such as `/config`. If you leave the prompt in NORMAL mode, it’s still in NORMAL mode when you return, with the cursor where you left it. - -### - -​ - -Mode switching +## Vim editor mode + +Enable vim-style editing via `/config` → Editor mode. + +### Mode switching Command| Action| From mode ---|---|--- @@ -177,11 +125,7 @@ `v`| Start character-wise visual selection| NORMAL `V`| Start line-wise visual selection| NORMAL -### - -​ - -Remap INSERT-mode key sequences +### Remap INSERT-mode key sequences The [`vimInsertModeRemaps`](</docs/en/settings-reference#viminsertmoderemaps>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: @@ -192,11 +136,7 @@ Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes. -### - -​ - -Navigation (NORMAL mode) +### Navigation (NORMAL mode) Command| Action ---|--- @@ -221,11 +161,7 @@ In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT. -### - -​ - -Editing (NORMAL mode) +### Editing (NORMAL mode) Command| Action ---|--- @@ -254,11 +190,7 @@ `u`| Undo `.`| Repeat last change -### - -​ - -Text objects (NORMAL mode) +### Text objects (NORMAL mode) Text objects work with operators like `d`, `c`, and `y`: @@ -272,11 +204,7 @@ `i[`/`a[`| Inner/around brackets `i{`/`a{`| Inner/around braces -### - -​ - -Visual mode +### Visual mode Press `v` for character-wise selection or `V` for line-wise selection. Motions extend the selection, and operators act on it directly. @@ -296,19 +224,11 @@ Block-wise visual mode with `Ctrl+V` is not supported. -### - -​ - -Cancel a question in vim mode +### Cancel a question in vim mode When you’re typing your own answer in the `Other` row of a [question Claude asks](</docs/en/tools-reference#askuserquestion-tool-behavior>), press `Esc` twice to cancel the question. To cancel with a single key press instead, [bind another key to cancel the question](</docs/en/keybindings#cancel-a-question-with-one-key-press>). -## - -​ - -Command history +## Command history Claude Code keeps a history of the prompts you type, and Up-arrow recall reaches prompts from past sessions of the same project: @@ -318,22 +238,14 @@ * When you recall a prompt that included pasted text, Claude Code sends the full pasted content again when you resubmit. If the content has since been [cleaned up](</docs/en/claude-directory#cleaned-up-automatically>), Claude Code doesn’t send the literal `[Pasted text #N]` string; see [Paste large content](</docs/en/terminal-config#paste-large-content>) for what happens to the prompt * History expansion with `!` is disabled by default -### - -​ - -Bring back a cleared draft +### Bring back a cleared draft To get back a draft you cleared with `Ctrl+C`, press `Up`, either right away or after you’ve sent a message or command: * **Right after clearing the draft** : press `Up` once while the prompt is still empty. Requires Claude Code v2.1.288 or later. * **After sending a message or command** : press `Up` to step back to the draft. Claude Code keeps the ten most recent cleared drafts for the current session, with their pasted text and images, and discards them when you exit. Requires Claude Code v2.1.292 or later. -### - -​ - -Reverse search with Ctrl+R +### Reverse search with Ctrl+R Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead. Type to filter in the dialog, and press `Up` and `Down` to move through the list of matches, with a preview pane showing the start of the highlighted match. In the dialog, press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search: @@ -348,21 +260,13 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. To find an earlier prompt when all you remember is something long you pasted into it, such as an error log, press `Ctrl+R` and type a word from the paste. Requires Claude Code v2.1.314 or later. - -## - -​ - -Background Bash commands +To find an earlier prompt when all you remember is something long you pasted into it, such as an error log, press `Ctrl+R` and type a word from the paste. Requires Claude Code v2.1.314 or later. + +## Background Bash commands Claude Code supports running Bash commands in the background, allowing you to continue working while long-running processes execute. -### - -​ - -How backgrounding works +### How backgrounding works When Claude Code runs a command in the background, it runs the command asynchronously and immediately returns a background task ID. Claude Code can respond to new prompts while the command continues executing in the background. To run commands in the background, you can either: @@ -390,11 +294,7 @@ * Development servers * Long-running processes (docker, terraform) -### - -​ - -Shell mode with `!` prefix +### Shell mode with `!` prefix Run shell commands directly without going through Claude by prefixing your input with `!`: @@ -415,19 +315,11 @@ Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#turn-off-the-retry-with-strict-sandbox-mode>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To add the output to context without a response instead, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. -## - -​ - -Queue messages while Claude works +## Queue messages while Claude works Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries in the conversation until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. If you queue a message with a selection attached from a [connected IDE](</docs/en/vs-code#the-built-in-ide-mcp-server>), it keeps the selection you had when you pressed `Enter`, whatever you select afterward. -### - -​ - -When Claude Code sends what you queued +### When Claude Code sends what you queued When a queued entry reaches Claude depends on what you queued. @@ -445,30 +337,18 @@ * `/effort`: the next message you send runs at the new level. To [start it in the turn Claude is already working on](</docs/en/model-config#when-a-new-effort-level-starts>), queue a message while Claude is running tool calls * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If your current model doesn’t support fast mode, turning it on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), and Claude Code uses the new model from its next request in that turn -### - -​ - -Background a session with messages queued +### Background a session with messages queued When the session moves to the background after you [press `←`](</docs/en/agent-view#switch-sessions-without-leaving-the-terminal>), the messages you had queued move with it. Claude reads them there in the order you sent them. Commands and `!` shell commands can’t move, and neither can some messages, such as one with an [IDE selection](</docs/en/vs-code#the-built-in-ide-mcp-server>) attached. If you press `←` while one of them is queued, the session stays in the foreground and a notice that begins `Cannot open agents` appears. To background the session, get the entry out of the queue and then press `←` again: * **Commands and`!` shell commands**: wait for them to run at the end of the turn, or take them back and clear the input box. While anything else is queued, you can’t take `!` shell commands back, so wait for them to run. * **Messages that can’t move** : wait until Claude has read them -### - -​ - -Take back what you queued +### Take back what you queued Press `Up` from the first line of the input box to take back the queued messages and commands. Claude Code removes them from the queue and puts them in the input box, one per line, ahead of any text you had typed. Edit the text and press `Enter` to queue it again as one entry, or clear the input box to drop it. Claude Code takes back queued shell commands only when the input box is empty and you have nothing else queued, and it switches the input box to shell mode when it does. Otherwise it leaves them in the queue, listed with their `!` prefix, and runs them after the turn ends. If you take back queued text while `←` [waits to background the session](</docs/en/agent-view#switch-sessions-without-leaving-the-terminal>), the text stays in the input box and Claude Code cancels the switch. If you take it back at the moment the session moves, the text disappears with the foreground screen: it wasn’t sent. Each message you took back is saved as its own entry in command history. To recover one, reopen the session and press `Up` on an empty prompt with nothing queued. -## - -​ - -Prompt suggestions +## Prompt suggestions When you first open a session, Claude Code shows a grayed-out example command in the prompt input to help you get started. It picks this from your project’s git history, so the example reflects files you’ve been working on recently. After Claude responds, Claude Code can suggest your next prompt based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. @@ -477,11 +357,7 @@ Claude Code generates each of these next-prompt suggestions with a short background request to the same model your session is using. The request counts toward your plan’s usage limits or your API costs. Because it reuses the conversation’s prompt cache, it is mostly cache reads plus a few output tokens, so the added cost is small. -### - -​ - -When Claude Code skips suggestions +### When Claude Code skips suggestions In interactive mode, Claude Code leaves prompt suggestions off by default and hides the **Prompt suggestions** toggle in `/config` in a [session that doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as one on a third-party provider or through a Claude apps gateway, and in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) whose flags haven’t arrived yet. Claude Code also skips individual suggestions in several situations, including: @@ -494,11 +370,7 @@ The notice `Showing fewer prompt suggestions · use one to bring them back` means Claude Code is showing suggestions less often because you left many in a row unused. To return to the usual frequency, use a suggestion or set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. -### - -​ - -Turn prompt suggestions off +### Turn prompt suggestions off To disable prompt suggestions entirely, use any of the following: @@ -510,11 +382,7 @@ To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/managed-settings>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings-reference#env>) key so that users can’t re-enable them with their own environment variable. -## - -​ - -You should know suggestions +## You should know suggestions “You should know” looks for one thing you should know but might have missed, such as a tradeoff Claude chose without calling it out or a result that may be off. When it finds one, it shows a short note above the prompt input: @@ -532,19 +400,11 @@ Where `/plugin` doesn’t list the mod, the enable command answers `Plugin "cc-plugin-you-should-know@builtin" is not installed in this project`. -### - -​ - -Cost of checks +### Cost of checks While the mod is on, checks are background requests to the same model your session is using, and they count toward your plan’s usage limits or your API costs. Each check sends what’s already in Claude’s context, meaning the conversation so far with its tool results, followed by the mod’s own instructions and the text of your recent notes. The conversation part is read from the session’s [prompt cache](</docs/en/prompt-caching>) on the same terms as Claude’s own next request. The instructions, several thousand tokens of them, and the side agent’s reply are billed in full on every check. To watch the checks happen, set [`CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG=1`](</docs/en/env-vars>) in your shell before you start Claude Code. -### - -​ - -Answer a note +### Answer a note Type the choice’s digit on its own into an empty prompt input. A note offers these choices: @@ -557,22 +417,14 @@ The main agent doesn’t see a note unless you send it with **Chat in main session**. Claude Code keeps your recent notes and the topics you marked as known in a file whose name starts with `cc-plugin-you-should-know` under `~/.claude/plugins/store/`. Each check, in this session and later ones, lists them to the side agent as ones not to repeat. Claude Code deletes the file once it has gone [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) without a session reading or writing it. To clear them sooner, delete that file while no session is running. -### - -​ - -Turn off You should know +### Turn off You should know To turn off You should know, use either of the following: * At the Claude Code prompt, run `/plugin disable cc-plugin-you-should-know@builtin`, or turn it off from the **Installed** tab of `/plugin` * After you choose **Dismiss** on a note without opening **Learn more** first, choose **Turn off suggestions** on the `Dismissed.` line, which clears after 20 seconds -## - -​ - -Emoji shortcodes +## Emoji shortcodes Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. @@ -581,28 +433,16 @@ The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings-reference#emojicompletionenabled>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement. -## - -​ - -Check spelling as you type +## Check spelling as you type Claude Code can underline misspelled words in the prompt input while you type. It checks only the text in the input box, never Claude’s replies or your files. It also checks nothing while the input box is in shell mode, `Ctrl+R` history search, or [voice dictation](</docs/en/voice-dictation>). Spell checking is off by default, and Claude Code checks nothing in [screen reader mode](</docs/en/accessibility>). Requires Claude Code v2.1.235 or later. -### - -​ - -Prerequisites +### Prerequisites * Install [aspell](<https://github.com/GNUAspell/aspell>), [hunspell](<https://github.com/hunspell/hunspell>), or [ispell](<https://en.wikipedia.org/wiki/Ispell>) and make sure it’s on your `PATH`. Claude Code runs the first of the three it finds, in that order, on every platform, including a `.cmd` shim a package manager installs on Windows. * To check that the program is on your `PATH`, run `aspell --version`, `hunspell --version`, or `ispell -v` in your terminal. A “command not found” error means it isn’t on your `PATH` yet. -### - -​ - -Turn spell checking on or off +### Turn spell checking on or off Claude Code reads the [`spellcheck`](</docs/en/settings-reference#spellcheck>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use: @@ -653,24 +493,16 @@ If more than one of the three places has a `spellcheck` setting, Claude Code uses only one of them: managed settings first, then `--settings`, then user settings. It doesn’t combine fields from two places. For example, when `--settings` sets `spellcheck`, a `language` in your user settings has no effect. -### - -​ - -What Claude Code underlines - -Shortly after you pause typing, Claude Code underlines the words the dictionary doesn’t know. It leaves the word you’re still typing alone until you move past it, and it never changes your text. It also skips text that looks like code: +### What Claude Code underlines + +Shortly after you pause typing, Claude Code underlines the words the dictionary doesn’t know. It leaves the word you’re still typing alone until you move past it. It also skips text that looks like code: * Commands such as `/help`, `@` mentions, URLs, file paths, and flags such as `--verbose` * Words with digits, underscores, or a capital letter after the first, and text in backticks Claude Code also skips Chinese, Japanese, Korean, Thai, Lao, Khmer, and Myanmar text. Claude Code has no word list of its own: a word is misspelled when your checker says so. To stop Claude Code from underlining a word, add the word to your checker’s personal dictionary, following the checker’s own documentation. Claude Code picks up the new word after you restart it. -### - -​ - -When Claude Code underlines nothing +### When Claude Code underlines nothing Claude Code underlines nothing when it can’t keep a checker running: @@ -680,19 +512,11 @@ To find out which of these happened, start `claude --debug` with spell checking on and type a word. Then look for the `[spellcheck]` lines in the debug log at `~/.claude/debug/<session-id>.txt`. One line names the program Claude Code started, or lists the ones it looked for and didn’t find. Later lines say why it stopped. A missing-dictionary error there means the checker has no dictionary for your `language` value, or no default one when `language` is unset. Install one, or set `language` to a dictionary you have. -## - -​ - -Invisible characters in prompts +## Invisible characters in prompts Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, that Enter sends nothing. The cleaned prompt goes back into the input box with a notice such as `Removed 3 invisible characters · review and press Enter to send`, and pressing Enter again sends the text as shown. When you pass a prompt on the command line, as in `claude "fix the login bug"`, Claude Code doesn’t wait for a second Enter. It removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. -## - -​ - -Review changes with /diff +## Review changes with /diff Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. What `/diff` opens depends on which renderer is active: @@ -701,11 +525,7 @@ The panel and the dialog both come from `cc-plugin-diff`, one of the [mods built into Claude Code](</docs/en/plugins/mods/overview#mods-built-into-claude-code>). If you disable that mod in `/plugin`, `/diff` opens Claude Code’s earlier panel and [diff viewer](</docs/en/keybindings#diff-actions>) instead. In the changes `/diff` reads from git, a submodule appears as a single entry, and only when the commit it points to changes; edits to files inside the submodule don’t appear there. The panel and the dialog also offer a view of each turn’s edits once Claude has edited files. These turn views come from Claude’s file edits rather than from git, so a change Claude makes through a shell command appears only under `Current`, the working-tree view. -### - -​ - -Diff panel +### Diff panel The diff panel lists the changed files with their added and removed line counts, and shows each file’s diff under the list. Claude Code refreshes it each time Claude edits a file or runs a shell command. To close the panel, run `/diff` again or click the `✕` in its header. To use the panel you need: @@ -724,11 +544,7 @@ To rebind the keys that scroll the file list or change the comparison, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). During an unfinished merge, rebase, cherry-pick, or revert, the panel keeps showing the changes it last read from git, so it doesn’t fill with the operation’s incoming changes. It updates at its first refresh after the operation ends, for example when Claude next edits a file. -### - -​ - -Diff dialog +### Diff dialog The diff dialog opens as a bordered block above the prompt and lists your changed files with their added and removed line counts. It compares them against `HEAD`, or against whatever you last chose in the diff panel for this repository. Once Claude has edited files, a `source` picker appears above the list. It offers one turn view, labeled `T1`, `T2`, and so on, for each of your prompts that led Claude to edit files. A turn view shows only that turn’s edits, and `Current` returns you to the working tree. Use these keys in the dialog: @@ -737,11 +553,7 @@ * **Esc** : return from a file’s diff to the list, or close the dialog from the list. * **Tab** : move to the `source` picker, then choose `Current` or a turn view with Up and Down and press Enter. In a file’s diff, Tab moves to the `ask` button. Press Enter to attach that file’s diff to your next prompt. -## - -​ - -Side questions with /btw +## Side questions with /btw Use `/btw` to ask a question about your current work without adding to the conversation history. @@ -767,19 +579,11 @@ In an attached [background session](</docs/en/agent-view#attach-to-a-session>), `Left` detaches and returns you to agent view, even while the answer is still arriving. The side question keeps running while you’re away. The next time you attach to the session, the overlay reopens with the side question, or with its answer. Before v2.1.257, `Left` didn’t detach there. `/btw` sees your full conversation, or the subagent transcript you have open, but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives. A [fork](</docs/en/sub-agents#fork-the-current-conversation>) starts from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. -### - -​ - -Ask /btw about a subagent +### Ask /btw about a subagent With a [subagent’s transcript open](</docs/en/sub-agents#observe-and-steer-running-forks>), Claude answers `/btw` from that transcript instead of the main conversation, so you can ask what the subagent did. A later `/btw` from that transcript sees only the side questions you asked from it. Requires Claude Code v2.1.314 or later. From an [agent team](</docs/en/agent-teams>) teammate’s transcript, Claude answers from the main conversation. -## - -​ - -Task list +## Task list The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. The list fills only in sessions that have the task-tracking tools, which Claude Code provides by default on [Opus 4.7, Sonnet 4.6, Haiku 4.5, and earlier models](</docs/en/tools-reference#task-tool-availability>). On any other model, including a model ID Claude Code doesn’t recognize, the list stays empty unless you opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). When the session has the tools, the task list works as follows: @@ -789,19 +593,11 @@ * Tasks persist across context compactions, helping Claude stay organized on larger projects * To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude` -## - -​ - -Session recap +## Session recap When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. It runs only when you ask for it yourself. When it arrives in a message relayed from a Slack, Teams, or project thread, you get a [notice](</docs/en/errors#recap-only-runs-when-you-ask-for-it-yourself>) instead of a recap. You also get the notice when `/recap` arrives in a prompt a cloud scheduled task sent. Session recap is on by default for every plan and provider. To turn automatic recaps off, open `/config` and turn off **Session recap**. The automatic recap never appears in non-interactive mode. Claude Code caps both automatic recaps and `/recap` output at 400 characters. -## - -​ - -Wait for a usage limit to reset +## Wait for a usage limit to reset When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, the lines at the bottom of the session show when your limit resets and when Claude will continue: @@ -816,11 +612,7 @@ In the continued task, Claude Code still asks for [permissions](</docs/en/permissions>) as usual, so the task can stop on a prompt while you’re away. If the task hits the limit again, the wait starts again. After three automatic continuations, automatic continue stops and the `Automatic continue stopped after repeated usage-limit hits` notification appears. Run `/rate-limit-options` to choose what to do next. When you send another prompt, or pick a wait from that menu, the count starts over. Automatic continue also stops after three continuations for a [`/goal`](</docs/en/goal>) or [session-scoped scheduled task](</docs/en/scheduled-tasks>) that runs through several reset windows. -### - -​ - -Cancel the wait +### Cancel the wait Press `Esc` at an empty prompt, or `Ctrl+C`, while the lines show, or run [`/rate-limit-options`](</docs/en/commands#all-commands>) and pick **Don’t continue automatically**. Claude Code confirms with a line that starts `Automatic continue cancelled`. After a cancel, nothing continues until you send a prompt or pick the row that starts **Wait here, then continue automatically** from `/rate-limit-options` again. Claude Code doesn’t start a wait on its own again for that reset window; the next reset window starts fresh. The wait also ends without continuing the task in these cases: @@ -830,11 +622,7 @@ * **The setting turns off, or the reset moves past 24 hours** : this ends only a wait Claude Code started on its own. A wait you picked from `/rate-limit-options` keeps counting down. * **The continuation is blocked** : a [`UserPromptSubmit` hook](</docs/en/hooks#userpromptsubmit>) that blocks the continuation prompt, or a failure before it reaches the model, ends the wait. Claude Code tells you the continuation didn’t run. Send a prompt to continue. -### - -​ - -Start a wait yourself +### Start a wait yourself Claude Code doesn’t start the wait on its own in these cases: @@ -848,19 +636,11 @@ * **API keys, cloud providers, and usage-based billing** : usage there is metered per request, so there is no reset to wait for. * **An[LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) without a saved claude.ai login**: Claude Code offers the wait only while a saved claude.ai login is the active credential. -### - -​ - -Turn automatic continue off +### Turn automatic continue off In `/config`, turn off **Continue automatically at usage limit** , or set [`autoContinueAtUsageLimit`](</docs/en/settings-reference#autocontinueatusagelimit>) to `false` in your user settings. `/config autoContinueAtUsageLimit=false` also works, including with `-p`, but the `key=value` form can’t turn it back on, because the setting grants unattended execution. Which settings files Claude Code reads for this key is in the [settings reference](</docs/en/settings-reference#autocontinueatusagelimit>). -## - -​ - -PR review status +## PR review status When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer, such as “PR #446”. The link has a colored underline indicating the review state: @@ -877,11 +657,7 @@ * **A GitHub Enterprise host set as`GH_HOST`**: `GH_ENTERPRISE_TOKEN` or `GITHUB_ENTERPRISE_TOKEN`, or the token saved by `gh auth login --hostname <host>`. Without one, the footer shows the same hints * **Any other GitHub host** : the token saved by `gh auth login --hostname <host>`. Without one, Claude Code shows no badge and no hint -### - -​ - -GitLab merge requests +### GitLab merge requests When you work on a branch with an open GitLab merge request, Claude Code shows a clickable `MR !N` badge in the footer slot that otherwise holds the GitHub PR link. `!N` is GitLab’s own reference syntax for merge request number N. The colored underline shows the merge request’s state: @@ -897,11 +673,7 @@ Claude Code ignores `glab`’s token environment variables, such as `GITLAB_TOKEN`, when it checks status, so you get no badge from an exported token alone. Claude Code also looks for `glab` and for its login once per session, so restart Claude Code after you install `glab` or run `glab auth login`. -## - -​ - -Issue reference links +## Issue reference links When Claude mentions an issue as `owner/repo#123`, you can click the reference to open it, as long as your terminal supports hyperlinks. If Claude Code doesn’t detect hyperlink support in your terminal, set [`FORCE_HYPERLINK`](</docs/en/env-vars>) to `1` to turn the links on, or to `0` to keep references as plain text. You get a link only for the two-part `owner/repo#123` form. These stay plain text: @@ -918,11 +690,7 @@ gitlab.com| `https://gitlab.com/owner/repo/-/issues/123` bitbucket.org, codeberg.org, or gitea.com| No link; the reference stays plain text -## - -​ - -See also +## See also * [Skills](</docs/en/skills>) \- Custom prompts and workflows * [Checkpointing](</docs/en/checkpointing>) \- Rewind Claude’s edits and restore previous states
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -285,7 +285,7 @@ `d`/`x`| Delete selection `y`| Yank selection `c`/`s`| Change selection -`p`| Replace selection with register contents +`p`/`P`| Replace selection with register contents `r{char}`| Replace every selected character with `{char}` `~`/`u`/`U`| Toggle, lowercase, or uppercase selection `>`/`<`| Indent or dedent selected lines @@ -348,7 +348,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. +Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. To find an earlier prompt when all you remember is something long you pasted into it, such as an error log, press `Ctrl+R` and type a word from the paste. Requires Claude Code v2.1.314 or later. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -335,10 +335,10 @@ Reverse search with Ctrl+R -Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search: +Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead. Type to filter in the dialog, and press `Up` and `Down` to move through the list of matches, with a preview pane showing the start of the highlighted match. In the dialog, press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search: 1. **Start search** : press `Ctrl+R` to activate reverse history search - 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results + 2. **Type query** : enter text to search for in previous commands. The current match appears in the prompt input. 3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches 4. **Search scope** : the inline search always searches prompts from all projects 5. **Accept match** : @@ -348,7 +348,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -The inline search scans your full prompt history, newest first, with duplicates collapsed to the newest occurrence. The fullscreen dialog searches your whole prompt history in the selected scope, newest first, with duplicates collapsed to the newest occurrence: the most recent prompts appear immediately, and matches from older prompts fill in as Claude Code loads the rest. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. +Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -765,7 +765,15 @@ `f`| Start a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the [panel below your prompt](</docs/en/sub-agents#observe-and-steer-running-forks>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer -In an attached [background session](</docs/en/agent-view#attach-to-a-session>), `Left` detaches and returns you to agent view, even while the answer is still arriving. The side question keeps running while you’re away. The next time you attach to the session, the overlay reopens with the side question, or with its answer. Before v2.1.257, `Left` didn’t detach there. `/btw` sees your full conversation but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives, or, for a [fork](</docs/en/sub-agents#fork-the-current-conversation>), from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. +In an attached [background session](</docs/en/agent-view#attach-to-a-session>), `Left` detaches and returns you to agent view, even while the answer is still arriving. The side question keeps running while you’re away. The next time you attach to the session, the overlay reopens with the side question, or with its answer. Before v2.1.257, `Left` didn’t detach there. `/btw` sees your full conversation, or the subagent transcript you have open, but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives. A [fork](</docs/en/sub-agents#fork-the-current-conversation>) starts from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. + +### + +​ + +Ask /btw about a subagent + +With a [subagent’s transcript open](</docs/en/sub-agents#observe-and-steer-running-forks>), Claude answers `/btw` from that transcript instead of the main conversation, so you can ask what the subagent did. A later `/btw` from that transcript sees only the side questions you asked from it. Requires Claude Code v2.1.314 or later. From an [agent team](</docs/en/agent-teams>) teammate’s transcript, Claude answers from the main conversation. ## @@ -806,7 +814,7 @@ * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the first line reads `Your usage limit has reset` and the second reads `Press enter to continue`. Press `Enter` to continue. After a shorter sleep, or one that ended before the reset, Claude Code continues on its own. * **Early** : when you finish adding [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) with `/usage-credits`, sign back in after `/upgrade`, or switch models with `/model` during the wait, Claude Code checks whether usage is available again and continues right away if it is. It doesn’t check after an upgrade or purchase you make in a browser on your own. Under [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on a different model, Claude Code waits for the reset instead. -The continued task runs like any other turn. Claude Code still asks for [permissions](</docs/en/permissions>) as usual, so the task can stop on a prompt while you’re away. If it hits the limit again, Claude Code re-arms the wait on its own at most twice in a row, then stops and shows `Automatic continue stopped after repeated usage-limit hits · /rate-limit-options to try again`. +In the continued task, Claude Code still asks for [permissions](</docs/en/permissions>) as usual, so the task can stop on a prompt while you’re away. If the task hits the limit again, the wait starts again. After three automatic continuations, automatic continue stops and the `Automatic continue stopped after repeated usage-limit hits` notification appears. Run `/rate-limit-options` to choose what to do next. When you send another prompt, or pick a wait from that menu, the count starts over. Automatic continue also stops after three continuations for a [`/goal`](</docs/en/goal>) or [session-scoped scheduled task](</docs/en/scheduled-tasks>) that runs through several reset windows. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -441,7 +441,7 @@ In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter` and queues the draft instead; `Ctrl+X Ctrl+S` works in any terminal. Both keys are bindings of the [`chat:sendNow` action](</docs/en/keybindings#chat-actions>). Press `Esc` to interrupt the turn without submitting your draft. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: - * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn + * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code uses the new model from the next request it makes in that turn * `/effort`: the next message you send runs at the new level. To [start it in the turn Claude is already working on](</docs/en/model-config#when-a-new-effort-level-starts>), queue a message while Claude is running tool calls * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If your current model doesn’t support fast mode, turning it on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), and Claude Code uses the new model from its next request in that turn @@ -818,7 +818,7 @@ * **You send a prompt** : Claude Code sends your prompt instead of waiting. If your prompt hits the limit too, it stays in the conversation and Claude Code starts the wait again. * **You exit Claude Code** : the wait doesn’t restart when you resume the session. - * **The conversation changes hands** : you switch accounts with `/login`, clear or rewind the conversation, `/resume` another session, pull one with `/teleport`, relaunch with `/tui`, or hand the session to Claude Desktop, a background session, or the cloud. + * **The conversation changes hands** : you switch accounts with `/login`, clear or rewind the conversation, `/resume` another session, pull one with `/teleport`, relaunch with `/tui` or [`/restart`](</docs/en/commands#all-commands>), or move the session to Claude Desktop, a background session, or the cloud. * **The setting turns off, or the reset moves past 24 hours** : this ends only a wait Claude Code started on its own. A wait you picked from `/rate-limit-options` keeps counting down. * **The continuation is blocked** : a [`UserPromptSubmit` hook](</docs/en/hooks#userpromptsubmit>) that blocks the continuation prompt, or a failure before it reaches the model, ends the wait. Claude Code tells you the continuation didn’t run. Send a prompt to continue.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -382,7 +382,7 @@ * Background commands in a local session you work in from a terminal, the desktop app, or the VS Code extension have no time limit. In a session that runs unattended, such as a `-p` run or a cloud session, Claude Code stops a background command at its [time limit](</docs/en/tools-reference#time-limit-for-background-commands>) * A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference -To turn off background commands, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. With it set, you also lose background subagents, background forked skills, and `Ctrl+B`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) has the same effect. **Common backgrounded commands:** +To turn off background commands, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. With it set, you also lose the `Ctrl+B` shortcut and [other background features](</docs/en/env-vars#variables>), such as [running skills in the background](</docs/en/skills#run-skills-in-a-subagent>). Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) has the same effect. **Common backgrounded commands:** * Build tools (webpack, vite, make) * Package managers (npm, yarn, pnpm)
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -100,7 +100,7 @@ `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete. In sessions with [cross-session messaging](</docs/en/cross-session-messaging#message-another-session>), when you type at least one letter after the `@`, Claude Code also suggests your other live sessions on this machine, so you can tell Claude to message the one you pick. Requires Claude Code v2.1.232 or later -`:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later +`:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes `?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character ### @@ -219,7 +219,7 @@ `%`| Jump to the matching `()`, `[]`, or `{}` bracket, starting from the next bracket on the current line when the cursor isn’t on a bracket. Requires Claude Code v2.1.301 or later `/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead -In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode. +In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT. ### @@ -574,7 +574,7 @@ Emoji shortcodes -Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. Requires Claude Code v2.1.217 or later. +Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. * Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:` * Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji @@ -798,11 +798,11 @@ When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, the lines at the bottom of the session show when your limit resets and when Claude will continue: Usage limit reached · limit resets 3:45pm - Continuing automatically at 3:45pm · esc to cancel + Continuing automatically at 3:45pm · Esc to cancel Either line can carry more after these words, such as a help link on the first or `/usage-credits to continue now` on the second. When the wait starts on its own, the conversation also records it with a line that reads `Usage limit reached · continuing automatically at 3:45pm · esc to cancel`. Keep the session open. What happens next depends on how the wait ends: - * **At the reset** : the second line changes to `Continuing shortly · esc to cancel`. Then `Usage limit reset · continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. + * **At the reset** : the second line changes to `Continuing shortly · Esc to cancel`. Then `Usage limit reset · Continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the first line reads `Your usage limit has reset` and the second reads `Press enter to continue`. Press `Enter` to continue. After a shorter sleep, or one that ended before the reset, Claude Code continues on its own. * **Early** : when you finish adding [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) with `/usage-credits`, sign back in after `/upgrade`, or switch models with `/model` during the wait, Claude Code checks whether usage is available again and continues right away if it is. It doesn’t check after an upgrade or purchase you make in a browser on your own. Under [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on a different model, Claude Code waits for the reset instead.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -442,7 +442,7 @@ In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter` and queues the draft instead; `Ctrl+X Ctrl+S` works in any terminal. Both keys are bindings of the [`chat:sendNow` action](</docs/en/keybindings#chat-actions>). Press `Esc` to interrupt the turn without submitting your draft. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn - * [`/effort`](</docs/en/model-config#adjust-effort-level>): once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn + * `/effort`: the next message you send runs at the new level. To [start it in the turn Claude is already working on](</docs/en/model-config#when-a-new-effort-level-starts>), queue a message while Claude is running tool calls * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If your current model doesn’t support fast mode, turning it on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), and Claude Code uses the new model from its next request in that turn ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -722,7 +722,7 @@ * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each repository. -To rebind the keys that scroll the file list or change the comparison, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). +To rebind the keys that scroll the file list or change the comparison, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). During an unfinished merge, rebase, cherry-pick, or revert, the panel keeps showing the changes it last read from git, so it doesn’t fill with the operation’s incoming changes. It updates at its first refresh after the operation ends, for example when Claude next edits a file. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -369,7 +369,7 @@ * Prompt Claude Code to run a command in the background * Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key. -When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>) instead of stopping it, unless the command starts with `sleep`. If you’ve turned background tasks off with [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) or by starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), the command stops at its timeout. To change the timeout, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:** +When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>) instead of stopping it, unless the command starts with `sleep`. If you’ve turned background commands off with [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) or by starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), the command stops at its timeout. To change the timeout, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:** * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval @@ -382,7 +382,7 @@ * Background commands in a local session you work in from a terminal, the desktop app, or the VS Code extension have no time limit. In a session that runs unattended, such as a `-p` run or a cloud session, Claude Code stops a background command at its [time limit](</docs/en/tools-reference#time-limit-for-background-commands>) * A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference -To disable all background task functionality, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) turns it off as well. **Common backgrounded commands:** +To turn off background commands, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. With it set, you also lose background subagents, background forked skills, and `Ctrl+B`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) has the same effect. **Common backgrounded commands:** * Build tools (webpack, vite, make) * Package managers (npm, yarn, pnpm)
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -296,6 +296,14 @@ Block-wise visual mode with `Ctrl+V` is not supported. +### + +​ + +Cancel a question in vim mode + +When you’re typing your own answer in the `Other` row of a [question Claude asks](</docs/en/tools-reference#askuserquestion-tool-behavior>), press `Esc` twice to cancel the question. To cancel with a single key press instead, [bind another key to cancel the question](</docs/en/keybindings#cancel-a-question-with-one-key-press>). + ## ​ @@ -441,6 +449,17 @@ ​ +Background a session with messages queued + +When the session moves to the background after you [press `←`](</docs/en/agent-view#switch-sessions-without-leaving-the-terminal>), the messages you had queued move with it. Claude reads them there in the order you sent them. Commands and `!` shell commands can’t move, and neither can some messages, such as one with an [IDE selection](</docs/en/vs-code#the-built-in-ide-mcp-server>) attached. If you press `←` while one of them is queued, the session stays in the foreground and a notice that begins `Cannot open agents` appears. To background the session, get the entry out of the queue and then press `←` again: + + * **Commands and`!` shell commands**: wait for them to run at the end of the turn, or take them back and clear the input box. While anything else is queued, you can’t take `!` shell commands back, so wait for them to run. + * **Messages that can’t move** : wait until Claude has read them + +### + +​ + Take back what you queued Press `Up` from the first line of the input box to take back the queued messages and commands. Claude Code removes them from the queue and puts them in the input box, one per line, ahead of any text you had typed. Edit the text and press `Enter` to queue it again as one entry, or clear the input box to drop it. Claude Code takes back queued shell commands only when the input box is empty and you have nothing else queued, and it switches the input box to shell mode when it does. Otherwise it leaves them in the queue, listed with their `!` prefix, and runs them after the turn ends. If you take back queued text while `←` [waits to background the session](</docs/en/agent-view#switch-sessions-without-leaving-the-terminal>), the text stays in the input box and Claude Code cancels the switch. If you take it back at the moment the session moves, the text disappears with the foreground screen: it wasn’t sent. Each message you took back is saved as its own entry in command history. To recover one, reopen the session and press `Up` on an empty prompt with nothing queued.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -14,7 +14,7 @@ Shortcut| Description| Context ---|---|--- -`Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code. Press `Up` while the prompt is still empty to bring the cleared draft back, which requires Claude Code v2.1.288 or later +`Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code. To get a cleared draft back, see Bring back a cleared draft `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm. You can press it while a background subagent’s permission prompt is open| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save @@ -314,6 +314,17 @@ ​ +Bring back a cleared draft + +To get back a draft you cleared with `Ctrl+C`, press `Up`, either right away or after you’ve sent a message or command: + + * **Right after clearing the draft** : press `Up` once while the prompt is still empty. Requires Claude Code v2.1.288 or later. + * **After sending a message or command** : press `Up` to step back to the draft. Claude Code keeps the ten most recent cleared drafts for the current session, with their pasted text and images, and discards them when you exit. Requires Claude Code v2.1.292 or later. + +### + +​ + Reverse search with Ctrl+R Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search:
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -183,7 +183,7 @@ Remap INSERT-mode key sequences -The [`vimInsertModeRemaps`](</docs/en/settings-reference#viminsertmoderemaps>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: +The [`vimInsertModeRemaps`](</docs/en/settings-reference#viminsertmoderemaps>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: { "editorMode": "vim", @@ -242,8 +242,8 @@ `cc`| Change line `C`| Change to end of line `cw`/`ce`/`cb`| Change word/to end/back -`s`| Substitute character: delete the character under the cursor and enter INSERT mode. Requires Claude Code v2.1.211 or later -`S`| Substitute line: clear the line and enter INSERT mode. Requires Claude Code v2.1.211 or later +`s`| Substitute character: delete the character under the cursor and enter INSERT mode +`S`| Substitute line: clear the line and enter INSERT mode `yy`/`Y`| Yank (copy) line `yw`/`ye`/`yb`| Yank word/to end/back `p`| Paste after cursor @@ -459,7 +459,7 @@ * After the first turn of a conversation, in some sessions * The previous response ended in an error * While you’re in plan mode - * Your account is close to or at its usage limit. To keep suggestions on until you reach the limit, set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. Before v2.1.238, Claude Code skipped them near the limit even with the variable set to `true` + * Your account is close to or at its usage limit. To keep this skip from applying until you reach the limit, set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. Before v2.1.238, Claude Code skipped suggestions near the limit even with the variable set to `true` * In an [agent team](</docs/en/agent-teams>), in teammates’ sessions by default. The lead’s session shows suggestions The notice `Showing fewer prompt suggestions · use one to bring them back` means Claude Code is showing suggestions less often because you left many in a row unused. To return to the usual frequency, use a suggestion or set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. @@ -724,7 +724,7 @@ * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>). * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself. -Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. +Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Once the answer appears, the overlay accepts these keys. Key| Action ---|--- @@ -757,7 +757,7 @@ Session recap -When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. It runs only when you ask for it yourself. When it arrives in a message relayed from a Slack, Teams, or project thread, or in a prompt a routine sent, you get a [notice](</docs/en/errors#recap-only-runs-when-you-ask-for-it-yourself>) instead of a recap. Session recap is on by default for every plan and provider. To turn automatic recaps off, open `/config` and turn off **Session recap**. The automatic recap never appears in non-interactive mode. Claude Code caps both automatic recaps and `/recap` output at 400 characters. +When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. It runs only when you ask for it yourself. When it arrives in a message relayed from a Slack, Teams, or project thread, you get a [notice](</docs/en/errors#recap-only-runs-when-you-ask-for-it-yourself>) instead of a recap. You also get the notice when `/recap` arrives in a prompt a cloud scheduled task sent. Session recap is on by default for every plan and provider. To turn automatic recaps off, open `/config` and turn off **Session recap**. The automatic recap never appears in non-interactive mode. Claude Code caps both automatic recaps and `/recap` output at 400 characters. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -216,6 +216,7 @@ `T{char}`| Jump to just after previous occurrence of character on the current line `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse +`%`| Jump to the matching `()`, `[]`, or `{}` bracket, starting from the next bracket on the current line when the cursor isn’t on a bracket. Requires Claude Code v2.1.301 or later `/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode. @@ -237,6 +238,7 @@ `dj`/`dk`| Delete the current line and the line below or above `dgg`/`dG`| Delete from the current line to the first or last line `d0`/`c0`/`y0`| Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later +`d%`/`c%`/`y%`| Delete, change, or yank from the cursor through the bracket that `%` jumps to. Requires Claude Code v2.1.301 or later `cc`| Change line `C`| Change to end of line `cw`/`ce`/`cb`| Change word/to end/back
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -482,6 +482,64 @@ ​ +You should know suggestions + +“You should know” looks for one thing you should know but might have missed, such as a tradeoff Claude chose without calling it out or a result that may be off. When it finds one, it shows a short note above the prompt input: + + ✦ Heads up · There was a change to how folder sharing starts in June, which may have bumped usage metrics artificially. + 1: Learn more 2: Knew this already 0: Dismiss + +It’s one of Claude Code’s [built-in mods](</docs/en/plugins/mods/overview#mods-built-into-claude-code>), a plugin built into Claude Code that is off by default. Requires Claude Code v2.1.287 or later. While it’s on, a side agent rereads the conversation from time to time as Claude works through a longer task. The side agent is a separate request to the same model and has no tools, so it can’t read files, run commands, or change what Claude does. If the mod is available for your organization, `/plugin` lists it when you connect to the Claude API directly with a claude.ai account or a Console API key. It doesn’t when you connect through an [LLM gateway](</docs/en/llm-gateway>) or a [Claude apps gateway](</docs/en/claude-apps-gateway>), or get your key from an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>). Even with a direct connection, these sessions don’t list it: + + * A session that [doesn’t fetch the feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>) the mod depends on, such as one with `DISABLE_TELEMETRY` set + * A [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) whose flags haven’t arrived yet + +To turn it on, run this at the Claude Code prompt: + + /plugin enable cc-plugin-you-should-know@builtin + +Where `/plugin` doesn’t list the mod, the enable command answers `Plugin "cc-plugin-you-should-know@builtin" is not installed in this project`. + +### + +​ + +Cost of checks + +While the mod is on, checks are background requests to the same model your session is using, and they count toward your plan’s usage limits or your API costs. Each check sends what’s already in Claude’s context, meaning the conversation so far with its tool results, followed by the mod’s own instructions and the text of your recent notes. The conversation part is read from the session’s [prompt cache](</docs/en/prompt-caching>) on the same terms as Claude’s own next request. The instructions, several thousand tokens of them, and the side agent’s reply are billed in full on every check. To watch the checks happen, set [`CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG=1`](</docs/en/env-vars>) in your shell before you start Claude Code. + +### + +​ + +Answer a note + +Type the choice’s digit on its own into an empty prompt input. A note offers these choices: + + * **Learn more** : opens a short explanation under the note, with its own choices: + * **Understood** : closes it and marks the topic as known + * **Chat in main session** : quotes the note into your prompt input so you can add a question and send it to Claude + * **Dismiss** : closes it without marking the topic as known + * **Knew this already** : closes the note and marks the topic as known. + * **Dismiss** : closes the note. + +The main agent doesn’t see a note unless you send it with **Chat in main session**. Claude Code keeps your recent notes and the topics you marked as known in a file whose name starts with `cc-plugin-you-should-know` under `~/.claude/plugins/store/`. Each check, in this session and later ones, lists them to the side agent as ones not to repeat. Claude Code deletes the file once it has gone [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) without a session reading or writing it. To clear them sooner, delete that file while no session is running. + +### + +​ + +Turn off You should know + +To turn off You should know, use either of the following: + + * At the Claude Code prompt, run `/plugin disable cc-plugin-you-should-know@builtin`, or turn it off from the **Installed** tab of `/plugin` + * After you choose **Dismiss** on a note without opening **Learn more** first, choose **Turn off suggestions** on the `Dismissed.` line, which clears after 20 seconds + +## + +​ + Emoji shortcodes Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. Requires Claude Code v2.1.217 or later.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -683,7 +683,7 @@ Task list -The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. The list fills only in sessions that have the task-tracking tools, which Claude Code provides by default on [Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5](</docs/en/tools-reference#task-tool-availability>). On any other model, including a model ID Claude Code doesn’t recognize, the list stays empty unless you opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). When the session has the tools, the task list works as follows: +The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. The list fills only in sessions that have the task-tracking tools, which Claude Code provides by default on [Opus 4.7, Sonnet 4.6, Haiku 4.5, and earlier models](</docs/en/tools-reference#task-tool-availability>). On any other model, including a model ID Claude Code doesn’t recognize, the list stays empty unless you opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). When the session has the tools, the task list works as follows: * Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display * If you leave the list expanded, Claude Code restores the expanded view the next time you launch into a session that still has tasks, such as with `--resume` or `--continue`. When the task list is empty, Claude Code starts it collapsed
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -14,7 +14,7 @@ Shortcut| Description| Context ---|---|--- -`Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code +`Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code. Press `Up` while the prompt is still empty to bring the cleared draft back, which requires Claude Code v2.1.288 or later `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm. You can press it while a background subagent’s permission prompt is open| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save @@ -430,7 +430,7 @@ Take back what you queued -Press `Up` from the first line of the input box to take back the queued messages and commands. Claude Code removes them from the queue and puts them in the input box, one per line, ahead of any text you had typed. Edit the text and press `Enter` to queue it again as one entry, or clear the input box to drop it. Claude Code takes back queued shell commands only when the input box is empty and you have nothing else queued, and it switches the input box to shell mode when it does. Otherwise it leaves them in the queue, listed with their `!` prefix, and runs them after the turn ends. +Press `Up` from the first line of the input box to take back the queued messages and commands. Claude Code removes them from the queue and puts them in the input box, one per line, ahead of any text you had typed. Edit the text and press `Enter` to queue it again as one entry, or clear the input box to drop it. Claude Code takes back queued shell commands only when the input box is empty and you have nothing else queued, and it switches the input box to shell mode when it does. Otherwise it leaves them in the queue, listed with their `!` prefix, and runs them after the turn ends. If you take back queued text while `←` [waits to background the session](</docs/en/agent-view#switch-sessions-without-leaving-the-terminal>), the text stays in the input box and Claude Code cancels the switch. If you take it back at the moment the session moves, the text disappears with the foreground screen: it wasn’t sent. Each message you took back is saved as its own entry in command history. To recover one, reopen the session and press `Up` on an empty prompt with nothing queued. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -210,10 +210,10 @@ `^`| First non-blank character `gg`| Beginning of input `G`| Beginning of last line -`f{char}`| Jump to next occurrence of character -`F{char}`| Jump to previous occurrence of character -`t{char}`| Jump to just before next occurrence of character -`T{char}`| Jump to just after previous occurrence of character +`f{char}`| Jump to next occurrence of character on the current line +`F{char}`| Jump to previous occurrence of character on the current line +`t{char}`| Jump to just before next occurrence of character on the current line +`T{char}`| Jump to just after previous occurrence of character on the current line `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse `/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead @@ -233,7 +233,7 @@ `dd`| Delete line `D`| Delete to end of line `dw`/`de`/`db`| Delete word/to end/back -`df{char}`/`dt{char}`| Delete to and including, or up to, the next occurrence of a character +`df{char}`/`dt{char}`| Delete to and including, or up to, the next occurrence of a character on the current line `dj`/`dk`| Delete the current line and the line below or above `dgg`/`dG`| Delete from the current line to the first or last line `d0`/`c0`/`y0`| Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later @@ -810,6 +810,7 @@ * A bare `#123` * A nested GitLab path such as `group/subgroup/project#123` * Any reference inside a code span or code block + * Any reference in a reply longer than about 1,000 lines or 100,000 characters Claude Code builds the link for the host of the repository it identifies from your git remote, not for the repository the reference names:
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -34,7 +34,7 @@ `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5, Sonnet 5.5, or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -209,7 +209,7 @@ `$`| End of line `^`| First non-blank character `gg`| Beginning of input -`G`| End of input +`G`| Beginning of last line `f{char}`| Jump to next occurrence of character `F{char}`| Jump to previous occurrence of character `t{char}`| Jump to just before next occurrence of character @@ -355,7 +355,7 @@ * Background tasks are automatically cleaned up when Claude Code exits. On macOS and Linux, when you stop a background task from [`/tasks`](</docs/en/commands>) or Claude Code stops it at exit, processes that detached from the task’s shell, such as ones started under `setsid` or `timeout`, stop too * If you background the session instead of exiting it, your background tasks keep running in the background session. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why - * On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Requires Claude Code v2.1.193 or later + * On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running * The [debug log](</docs/en/debug-your-config>) says why tasks were stopped, or why a pressure event left them running * Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn off memory-pressure stops * Background commands in a local session you work in from a terminal, the desktop app, or the VS Code extension have no time limit. In a session that runs unattended, such as a `-p` run or a cloud session, Claude Code stops a background command at its [time limit](</docs/en/tools-reference#time-limit-for-background-commands>) @@ -388,11 +388,11 @@ * Supports the same `Ctrl+B` backgrounding for long-running commands * Doesn’t require Claude to interpret or approve the command * Supports history-based autocomplete: type a partial command and press `Tab` to complete from previous `!` commands in the current project - * Supports live file path autocomplete as of v2.1.193 on all platforms: type a token containing a forward slash, such as `./src/` or `~/`, to see a dropdown of matching files and directories, then press `Tab` to accept. Use forward slashes on Windows too; the dropdown is triggered by `/`, not `\` + * Supports live file path autocomplete: type a token containing a forward slash, such as `./src/` or `~/`, to see a dropdown of matching files and directories, then press `Tab` to accept. Use forward slashes on Windows too; the dropdown is triggered by `/`, not `\` * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#turn-off-the-retry-with-strict-sandbox-mode>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. +Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#turn-off-the-retry-with-strict-sandbox-mode>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To add the output to context without a response instead, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -15,7 +15,7 @@ Shortcut| Description| Context ---|---|--- `Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code -`Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm| Subagent control +`Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm. You can press it while a background subagent’s permission prompt is open| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save `Ctrl+L`| Redraw the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. See [Clear the conversation](</docs/en/fullscreen#clear-the-conversation>) for fullscreen rendering
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -460,7 +460,7 @@ * Your account is close to or at its usage limit. To keep suggestions on until you reach the limit, set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. Before v2.1.238, Claude Code skipped them near the limit even with the variable set to `true` * In an [agent team](</docs/en/agent-teams>), in teammates’ sessions by default. The lead’s session shows suggestions -In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. +The notice `Showing fewer prompt suggestions · use one to bring them back` means Claude Code is showing suggestions less often because you left many in a row unused. To return to the usual frequency, use a suggestion or set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -358,7 +358,7 @@ * On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Requires Claude Code v2.1.193 or later * The [debug log](</docs/en/debug-your-config>) says why tasks were stopped, or why a pressure event left them running * Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn off memory-pressure stops - * Background Bash and PowerShell commands have a time limit, counted from the moment the command enters the background: 30 minutes, or the `timeout` Claude asks for when it starts a command in the background, up to a maximum of 2 hours. A command that moves to the background while it runs, for example with `Ctrl+B`, gets 30 minutes from the move. When a command reaches its limit, Claude Code stops it and tells Claude why, and Claude can start it again with a longer `timeout` if the work still needs it. To lengthen the limits, see [Raise the time limit for background commands](</docs/en/tools-reference#raise-the-time-limit-for-background-commands>) in the tools reference + * Background commands in a local session you work in from a terminal, the desktop app, or the VS Code extension have no time limit. In a session that runs unattended, such as a `-p` run or a cloud session, Claude Code stops a background command at its [time limit](</docs/en/tools-reference#time-limit-for-background-commands>) * A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference To disable all background task functionality, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) turns it off as well. **Common backgrounded commands:**
modified
Show diff (147 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -392,7 +392,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. +Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#turn-off-the-retry-with-strict-sandbox-mode>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. ## @@ -400,7 +400,7 @@ Queue messages while Claude works -Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries in the conversation until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. If you queue a message with a selection attached from a [connected IDE](</docs/en/vs-code#the-built-in-ide-mcp-server>) or the diff panel, it keeps the selection you had when you pressed `Enter`, whatever you select afterward. +Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries in the conversation until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. If you queue a message with a selection attached from a [connected IDE](</docs/en/vs-code#the-built-in-ide-mcp-server>), it keeps the selection you had when you pressed `Enter`, whatever you select afterward. ### @@ -596,7 +596,7 @@ Invisible characters in prompts -Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, that Enter sends nothing. The cleaned prompt goes back into the input box with a notice such as `Removed 3 invisible characters · review and press Enter to send`, and pressing Enter again sends the text as shown. When you pass a prompt on the command line, as in `claude "fix the login bug"`, or pipe one into an interactive session, Claude Code doesn’t wait for a second Enter. It removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. +Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, that Enter sends nothing. The cleaned prompt goes back into the input box with a notice such as `Removed 3 invisible characters · review and press Enter to send`, and pressing Enter again sends the text as shown. When you pass a prompt on the command line, as in `claude "fix the login bug"`, Claude Code doesn’t wait for a second Enter. It removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. ## @@ -604,7 +604,12 @@ Review changes with /diff -Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. In the changes `/diff` reads from git, a submodule appears as a single entry, and only when the commit it points to changes; edits to files inside the submodule don’t appear there. In [fullscreen rendering](</docs/en/fullscreen>), `/diff` opens the diff panel beside the conversation, which stays open and updates while you keep working. In the classic renderer, `/diff` opens the diff viewer in place of the prompt, and you close it when you’re done reading. +Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. What `/diff` opens depends on which renderer is active: + + * **[Fullscreen rendering](</docs/en/fullscreen>)** : the diff panel opens beside the conversation. It stays open and updates while you keep working. + * **Classic renderer** : the diff dialog opens above the prompt, and you close it when you’re done reading. + +The panel and the dialog both come from `cc-plugin-diff`, one of the [mods built into Claude Code](</docs/en/plugins/mods/overview#mods-built-into-claude-code>). If you disable that mod in `/plugin`, `/diff` opens Claude Code’s earlier panel and [diff viewer](</docs/en/keybindings#diff-actions>) instead. In the changes `/diff` reads from git, a submodule appears as a single entry, and only when the commit it points to changes; edits to files inside the submodule don’t appear there. The panel and the dialog also offer a view of each turn’s edits once Claude has edited files. These turn views come from Claude’s file edits rather than from git, so a change Claude makes through a shell command appears only under `Current`, the working-tree view. ### @@ -612,37 +617,35 @@ Diff panel -The diff panel lists the changed files with their added and removed line counts, and shows each file’s diff under the list. Claude Code refreshes it each time Claude edits a file or runs a shell command. To close it, run `/diff` again or click the `✕` in its header. To use the panel you need: +The diff panel lists the changed files with their added and removed line counts, and shows each file’s diff under the list. Claude Code refreshes it each time Claude edits a file or runs a shell command. To close the panel, run `/diff` again or click the `✕` in its header. To use the panel you need: * [Fullscreen rendering](</docs/en/fullscreen>) * A git repository * A terminal at least 110 columns wide - * Claude Code v2.1.260 or later - -When the panel can’t open, `/diff` opens the diff viewer instead or tells you why. The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: + * Claude Code v2.1.287 or later + +The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: * **Jump to a file** : click its row in the list. Scroll the panel with the mouse wheel. When the file list itself is too long to fit, scroll it with `Alt+Up` and `Alt+Down`, or `Ctrl+Up` and `Ctrl+Down`. - * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count in the input until you send it. - * To send the prompt without the selection, move the cursor to just after the line-count indicator and press `Backspace` to delete it. Requires Claude Code v2.1.271 or later. + * **Ask Claude about a file’s changes** : click `ask`, at the right of the file’s name above its diff. Claude Code attaches that file’s diff to your next prompt, and the button reads `asked ✓` until you send that prompt. Asking on a second file replaces the first. + * **Show one turn’s edits** : click the `source` picker in the panel’s header, then choose a turn with `Up` and `Down` and press `Enter`. Turns are labeled `T1`, `T2`, and so on. The picker appears once Claude has edited files, and `Current` returns you to the working tree. * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. - * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each project. - -To bind keys to these actions, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). - -### - -​ - -Diff viewer - -The diff viewer takes the place of the prompt until you close it. Its **Current** view shows your uncommitted changes from git, or, when there are none, what your branch adds on top of the default branch. The viewer also has a turn view for each prompt after which Claude edited files, showing just those edits. Claude Code builds the turn views from Claude’s file edits rather than from git, so a change Claude makes through a shell command appears only under Current. Use these keys in the viewer: - - * **Left and Right** : move between Current and the turn views. + * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each repository. + +To rebind the keys that scroll the file list or change the comparison, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). + +### + +​ + +Diff dialog + +The diff dialog opens as a bordered block above the prompt and lists your changed files with their added and removed line counts. It compares them against `HEAD`, or against whatever you last chose in the diff panel for this repository. Once Claude has edited files, a `source` picker appears above the list. It offers one turn view, labeled `T1`, `T2`, and so on, for each of your prompts that led Claude to edit files. A turn view shows only that turn’s edits, and `Current` returns you to the working tree. Use these keys in the dialog: + * **Up and Down** : select a file. * **Enter** : open the selected file’s diff. Scroll it with Up and Down, or PageUp and PageDown. - * **Esc** : return from a file’s diff to the list, or close the viewer from the list. - -To rebind these keys, see [Diff actions](</docs/en/keybindings#diff-actions>). + * **Esc** : return from a file’s diff to the list, or close the dialog from the list. + * **Tab** : move to the `source` picker, then choose `Current` or a turn view with Up and Down and press Enter. In a file’s diff, Tab moves to the `ask` button. Press Enter to attach that file’s diff to your next prompt. ## @@ -694,7 +697,7 @@ Session recap -When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. Claude Code caps both automatic recaps and `/recap` output at 400 characters. To turn automatic recaps off, open `/config` and turn off **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode. +When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. It runs only when you ask for it yourself. When it arrives in a message relayed from a Slack, Teams, or project thread, or in a prompt a routine sent, you get a [notice](</docs/en/errors#recap-only-runs-when-you-ask-for-it-yourself>) instead of a recap. Session recap is on by default for every plan and provider. To turn automatic recaps off, open `/config` and turn off **Session recap**. The automatic recap never appears in non-interactive mode. Claude Code caps both automatic recaps and `/recap` output at 400 characters. ## @@ -702,14 +705,15 @@ Wait for a usage limit to reset -When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, a line at the bottom of the session shows when it will continue: - - Usage limit reached · continuing automatically at 3:45pm · esc to cancel - -Keep the session open. What happens next depends on how the wait ends: - - * **At the reset** : the line reads `continuing shortly`, then `Usage limit reset · continuing automatically`, and Claude Code sends Claude a fixed prompt to pick the task up where it stopped. It doesn’t resend your last message. - * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the line reads `Your usage limit has reset · press enter to continue`. Press `Enter` to continue. After a shorter sleep, Claude Code continues on its own. +When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, the lines at the bottom of the session show when your limit resets and when Claude will continue: + + Usage limit reached · limit resets 3:45pm + Continuing automatically at 3:45pm · esc to cancel + +Either line can carry more after these words, such as a help link on the first or `/usage-credits to continue now` on the second. When the wait starts on its own, the conversation also records it with a line that reads `Usage limit reached · continuing automatically at 3:45pm · esc to cancel`. Keep the session open. What happens next depends on how the wait ends: + + * **At the reset** : the second line changes to `Continuing shortly · esc to cancel`. Then `Usage limit reset · continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. + * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the first line reads `Your usage limit has reset` and the second reads `Press enter to continue`. Press `Enter` to continue. After a shorter sleep, or one that ended before the reset, Claude Code continues on its own. * **Early** : when you finish adding [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) with `/usage-credits`, sign back in after `/upgrade`, or switch models with `/model` during the wait, Claude Code checks whether usage is available again and continues right away if it is. It doesn’t check after an upgrade or purchase you make in a browser on your own. Under [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on a different model, Claude Code waits for the reset instead. The continued task runs like any other turn. Claude Code still asks for [permissions](</docs/en/permissions>) as usual, so the task can stop on a prompt while you’re away. If it hits the limit again, Claude Code re-arms the wait on its own at most twice in a row, then stops and shows `Automatic continue stopped after repeated usage-limit hits · /rate-limit-options to try again`. @@ -720,9 +724,9 @@ Cancel the wait -Press `Esc` at an empty prompt, or `Ctrl+C`, while the line shows, or run [`/rate-limit-options`](</docs/en/commands#all-commands>) and pick **Don’t continue automatically**. Claude Code confirms with a line that starts `Automatic continue cancelled`. After a cancel, nothing continues until you send a prompt or pick the row that starts **Wait here, then continue automatically** from `/rate-limit-options` again. Claude Code doesn’t start a wait on its own again for that reset window; the next reset window starts fresh. The wait also ends without continuing the task in these cases: - - * **You send a prompt** : Claude Code runs your prompt instead of waiting. +Press `Esc` at an empty prompt, or `Ctrl+C`, while the lines show, or run [`/rate-limit-options`](</docs/en/commands#all-commands>) and pick **Don’t continue automatically**. Claude Code confirms with a line that starts `Automatic continue cancelled`. After a cancel, nothing continues until you send a prompt or pick the row that starts **Wait here, then continue automatically** from `/rate-limit-options` again. Claude Code doesn’t start a wait on its own again for that reset window; the next reset window starts fresh. The wait also ends without continuing the task in these cases: + + * **You send a prompt** : Claude Code sends your prompt instead of waiting. If your prompt hits the limit too, it stays in the conversation and Claude Code starts the wait again. * **You exit Claude Code** : the wait doesn’t restart when you resume the session. * **The conversation changes hands** : you switch accounts with `/login`, clear or rewind the conversation, `/resume` another session, pull one with `/teleport`, relaunch with `/tui`, or hand the session to Claude Desktop, a background session, or the cloud. * **The setting turns off, or the reset moves past 24 hours** : this ends only a wait Claude Code started on its own. A wait you picked from `/rate-limit-options` keeps counting down.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -348,7 +348,7 @@ * Prompt Claude Code to run a command in the background * Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key. -When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`. To change how long commands run before that happens, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:** +When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>) instead of stopping it, unless the command starts with `sleep`. If you’ve turned background tasks off with [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) or by starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), the command stops at its timeout. To change the timeout, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:** * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval @@ -358,9 +358,10 @@ * On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Requires Claude Code v2.1.193 or later * The [debug log](</docs/en/debug-your-config>) says why tasks were stopped, or why a pressure event left them running * Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn off memory-pressure stops - * Background commands owned by a [subagent](</docs/en/sub-agents>) have no time limit, except that a command owned by a subagent running in the foreground ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the former 60-minute limit on subagent commands covered commands moved to the background with `Ctrl+B` - -To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** + * Background Bash and PowerShell commands have a time limit, counted from the moment the command enters the background: 30 minutes, or the `timeout` Claude asks for when it starts a command in the background, up to a maximum of 2 hours. A command that moves to the background while it runs, for example with `Ctrl+B`, gets 30 minutes from the move. When a command reaches its limit, Claude Code stops it and tells Claude why, and Claude can start it again with a longer `timeout` if the work still needs it. To lengthen the limits, see [Raise the time limit for background commands](</docs/en/tools-reference#raise-the-time-limit-for-background-commands>) in the tools reference + * A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference + +To disable all background task functionality, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) turns it off as well. **Common backgrounded commands:** * Build tools (webpack, vite, make) * Package managers (npm, yarn, pnpm)
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -34,7 +34,7 @@ `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5 or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5, Sonnet 5.5, or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -26,10 +26,10 @@ `Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents `Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, pasted content, and input mode, so a stashed `!` shell command comes back in shell mode `Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume -`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus +`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus. In a tabbed dialog, the keys switch tabs while the tab row has focus. See [Tabs actions](</docs/en/keybindings#tabs-actions>) for how focus moves `Tab`| Accept an autocomplete suggestion, or add a comment to a permission answer| While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back -`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) +`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. While a footer item is selected, such as a row in the [subagent panel](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) below the prompt, `Esc` [deselects it](</docs/en/keybindings#footer-actions>) instead of interrupting. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option @@ -229,10 +229,14 @@ Command| Action ---|--- `x`| Delete character +`r{char}`| Replace character under cursor with `{char}` `dd`| Delete line `D`| Delete to end of line `dw`/`de`/`db`| Delete word/to end/back `df{char}`/`dt{char}`| Delete to and including, or up to, the next occurrence of a character +`dj`/`dk`| Delete the current line and the line below or above +`dgg`/`dG`| Delete from the current line to the first or last line +`d0`/`c0`/`y0`| Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later `cc`| Change line `C`| Change to end of line `cw`/`ce`/`cb`| Change word/to end/back @@ -344,7 +348,7 @@ * Prompt Claude Code to run a command in the background * Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key. -**Key features:** +When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`. To change how long commands run before that happens, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:** * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval @@ -395,7 +399,7 @@ Queue messages while Claude works -Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries above the input box until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. +Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries in the conversation until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. If you queue a message with a selection attached from a [connected IDE](</docs/en/vs-code#the-built-in-ide-mcp-server>) or the diff panel, it keeps the selection you had when you pressed `Enter`, whatever you select afterward. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -24,14 +24,14 @@ `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents -`Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content +`Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, pasted content, and input mode, so a stashed `!` shell command comes back in shell mode `Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Tab`| Accept an autocomplete suggestion, or add a comment to a permission answer| While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point -`Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Interrupts the current turn so your queued messages, and your draft with them, go out right away instead of when the turn ends. In shell mode, the key queues your command without interrupting. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later +`Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5 or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta @@ -136,7 +136,7 @@ Commands -Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. +Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins/overview>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. ### @@ -408,7 +408,12 @@ * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends with messages still queued, they go out without another key press, in the order you typed them * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time, keeping the order you queued them in -To send what you queued without waiting for the turn to finish, press `Ctrl+Enter`. Claude Code interrupts the turn, and your queued messages go out right away, with your draft queued behind them if you had typed one. In shell mode, the key queues your command without interrupting the turn. Requires Claude Code v2.1.275 or later. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter` and queues the draft instead; `Ctrl+X Ctrl+S` works in any terminal. Both keys are bindings of the [`chat:sendNow` action](</docs/en/keybindings#chat-actions>). Press `Esc` to interrupt the turn without submitting your draft. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: +To send what you queued without waiting, press `Ctrl+Enter`. Your queued messages go out right away, with your draft queued behind them if you had typed one. Requires Claude Code v2.1.275 or later. If you queued a `!` shell command ahead of your messages, the key interrupts the turn. Otherwise, what happens to the turn depends on what Claude is doing when you press the key: + + * Running shell commands, subagents, or other work that can move to the background: that work moves to the background and keeps running, and Claude reads your messages in the same turn + * Only writing a response, or running something that can’t move to the background: Claude Code interrupts the turn and sends your messages next. Before v2.1.281, the key interrupted the turn in both cases + +In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter` and queues the draft instead; `Ctrl+X Ctrl+S` works in any terminal. Both keys are bindings of the [`chat:sendNow` action](</docs/en/keybindings#chat-actions>). Press `Esc` to interrupt the turn without submitting your draft. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn * [`/effort`](</docs/en/model-config#adjust-effort-level>): once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn @@ -433,7 +438,7 @@ * Press `Tab` or `Right arrow` to place the suggestion in the prompt input, then `Enter` to submit * Start typing to dismiss it -Claude Code generates each of these next-prompt suggestions with a background request that reuses the conversation’s prompt cache, so the additional cost is minimal. +Claude Code generates each of these next-prompt suggestions with a short background request to the same model your session is using. The request counts toward your plan’s usage limits or your API costs. Because it reuses the conversation’s prompt cache, it is mostly cache reads plus a few output tokens, so the added cost is small. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -18,7 +18,7 @@ `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save -`Ctrl+L`| Redraw or clear the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), it also clears the screen, and you can scroll up to see the earlier messages +`Ctrl+L`| Redraw the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. See [Clear the conversation](</docs/en/fullscreen#clear-the-conversation>) for fullscreen rendering `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands lines that collapse by default, such as MCP calls, shown as a single `Called slack 3 times` line, and [messages from your other sessions](</docs/en/cross-session-messaging#what-a-message-looks-like>), shown as a one-line `Message from @<sender>` preview `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` @@ -34,7 +34,7 @@ `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Interrupts the current turn so your queued messages, and your draft with them, go out right away instead of when the turn ends. In shell mode, the key queues your command without interrupting. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5.1 or Fable 5, which always use extended thinking. Works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5 or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -31,6 +31,7 @@ `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point +`Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Interrupts the current turn so your queued messages, and your draft with them, go out right away instead of when the turn ends. In shell mode, the key queues your command without interrupting. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5.1 or Fable 5, which always use extended thinking. Works on macOS without configuring Option as Meta @@ -350,7 +351,9 @@ * Background tasks are automatically cleaned up when Claude Code exits. On macOS and Linux, when you stop a background task from [`/tasks`](</docs/en/commands>) or Claude Code stops it at exit, processes that detached from the task’s shell, such as ones started under `setsid` or `timeout`, stop too * If you background the session instead of exiting it, your background tasks keep running in the background session. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why - * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later + * On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Requires Claude Code v2.1.193 or later + * The [debug log](</docs/en/debug-your-config>) says why tasks were stopped, or why a pressure event left them running + * Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn off memory-pressure stops * Background commands owned by a [subagent](</docs/en/sub-agents>) have no time limit, except that a command owned by a subagent running in the foreground ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the former 60-minute limit on subagent commands covered commands moved to the background with `Ctrl+B` To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** @@ -392,7 +395,7 @@ Queue messages while Claude works -Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries above the input box until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. +Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries above the input box until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. ### @@ -402,10 +405,10 @@ When a queued entry reaches Claude depends on what you queued. - * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends with messages still queued, Claude Code sends only the oldest as the next turn. The rest stay queued and follow the same rule: Claude Code passes them to Claude when that turn’s tool calls finish, or sends the next oldest as the turn after - * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time - -Press `Esc` to interrupt the turn instead. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: + * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends with messages still queued, they go out without another key press, in the order you typed them + * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time, keeping the order you queued them in + +To send what you queued without waiting for the turn to finish, press `Ctrl+Enter`. Claude Code interrupts the turn, and your queued messages go out right away, with your draft queued behind them if you had typed one. In shell mode, the key queues your command without interrupting the turn. Requires Claude Code v2.1.275 or later. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter` and queues the draft instead; `Ctrl+X Ctrl+S` works in any terminal. Both keys are bindings of the [`chat:sendNow` action](</docs/en/keybindings#chat-actions>). Press `Esc` to interrupt the turn without submitting your draft. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn * [`/effort`](</docs/en/model-config#adjust-effort-level>): once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn @@ -581,6 +584,14 @@ ​ +Invisible characters in prompts + +Pasted text can carry Unicode characters that a terminal draws as nothing at all, such as tag characters, bidirectional controls, and zero-width spaces, so a prompt can contain text you never see. To keep copied text from carrying instructions your terminal doesn’t draw, Claude Code removes those characters when you press Enter, before sending anything. It cleans both the prompt and the contents of any collapsed [pasted-text reference](</docs/en/terminal-config#paste-large-content>) the prompt includes. Claude Code keeps the joiners that Persian and Indic scripts write and the selectors inside emoji sequences. If Claude Code removed anything, that Enter sends nothing. The cleaned prompt goes back into the input box with a notice such as `Removed 3 invisible characters · review and press Enter to send`, and pressing Enter again sends the text as shown. When you pass a prompt on the command line, as in `claude "fix the login bug"`, or pipe one into an interactive session, Claude Code doesn’t wait for a second Enter. It removes the characters, shows a notice, and sends the cleaned prompt. If the cleaned prompt would begin with `/`, Claude Code puts it in the input box for you to review and send instead. + +## + +​ + Review changes with /diff Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. In the changes `/diff` reads from git, a submodule appears as a single entry, and only when the commit it points to changes; edits to files inside the submodule don’t appear there. In [fullscreen rendering](</docs/en/fullscreen>), `/diff` opens the diff panel beside the conversation, which stays open and updates while you keep working. In the classic renderer, `/diff` opens the diff viewer in place of the prompt, and you close it when you’re done reading.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -636,7 +636,7 @@ Claude answers a side question from what’s already in the conversation: your messages, its replies, and the tool results it has gathered. You can ask about code Claude has already read, decisions it made earlier, or anything else from the session. A later side question also sees your earlier side questions: Claude Code replays the newest 20 exchanges with each ask, until you clear them. The question and answer never enter the conversation history. In the terminal, they appear in a dismissible overlay. The terminal keeps the thread in memory: press `x` to clear the earlier exchanges, and it’s gone when you exit Claude Code. In the [VS Code extension](</docs/en/vs-code#use-the-prompt-box>)’s chat panel, `/btw` opens a panel rather than the overlay this section describes, and you ask follow-up questions right in the panel. The panel’s thread survives window reloads, on the retention schedule that page describes. You need the extension at v2.1.227 or later. Earlier extension versions don’t offer `/btw`. * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing. - * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. + * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. If Claude writes out tool calls as text anyway, the answer ends with a note that nothing was executed. * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>). * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -601,7 +601,8 @@ When the panel can’t open, `/diff` opens the diff viewer instead or tells you why. The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: * **Jump to a file** : click its row in the list. Scroll the panel with the mouse wheel. When the file list itself is too long to fit, scroll it with `Alt+Up` and `Alt+Down`, or `Ctrl+Up` and `Ctrl+Down`. - * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count next to the input until you send it. + * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count in the input until you send it. + * To send the prompt without the selection, move the cursor to just after the line-count indicator and press `Backspace` to delete it. Requires Claude Code v2.1.271 or later. * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each project.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -384,7 +384,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -In a regular interactive session, commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. See [strict sandbox mode](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) for the sessions where shell-mode commands run sandboxed too, such as background sessions with strict sandbox mode on. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. +Unless your session is one of those listed under [strict sandbox mode](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>), commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. ## @@ -658,7 +658,7 @@ Task list -The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. On [Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later versions of those families](</docs/en/tools-reference#task-tool-availability>), Claude keeps track of multi-step work without a written checklist, and Claude Code doesn’t provide the tools that fill this list, so it stays empty. If you’d like the task list on those models anyway, opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). On earlier models such as Opus 4.7, and after you opt in, the task list works as follows: +The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. The list fills only in sessions that have the task-tracking tools, which Claude Code provides by default on [Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5](</docs/en/tools-reference#task-tool-availability>). On any other model, including a model ID Claude Code doesn’t recognize, the list stays empty unless you opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). When the session has the tools, the task list works as follows: * Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display * If you leave the list expanded, Claude Code restores the expanded view the next time you launch into a session that still has tasks, such as with `--resume` or `--continue`. When the task list is empty, Claude Code starts it collapsed
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -137,6 +137,19 @@ Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. +### + +​ + +Complete a command mid-prompt + +Command completion also works partway through a prompt: type `/` after a space, then the first letters of a name, as in `run the tests, then /com`. Only commands whose names start with those letters match, so a file path such as `/tmp/notes.md` doesn’t keep a list open. Claude Code runs a command itself only when the command [starts your message](</docs/en/commands>). + + * **In[fullscreen rendering](</docs/en/fullscreen>)**: the matches open as a list while you type, with no row highlighted, so `Enter` still sends your prompt as typed. Press `Tab` to insert the top match, or pick a row with the arrow keys and `Enter`. + * **Outside fullscreen** : the rest of the top match appears as ghost text at your cursor, with a count such as `+2` when more commands match. Press `Tab` to insert the only match, or to open the list when several match, then pick a row with the arrow keys and `Enter`. + +In both renderers, press `Tab` on a bare mid-prompt `/` to list every command. A plugin skill matches on its bare name too, so `/deploy` finds a skill named `myplugin:deploy-app`. When you insert the match, Claude Code writes the full `/myplugin:deploy-app`. + ## ​ @@ -337,7 +350,8 @@ * Background tasks are automatically cleaned up when Claude Code exits. On macOS and Linux, when you stop a background task from [`/tasks`](</docs/en/commands>) or Claude Code stops it at exit, processes that detached from the task’s shell, such as ones started under `setsid` or `timeout`, stop too * If you background the session instead of exiting it, your background tasks keep running in the background session. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why - * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). A command owned by a subagent running in the foreground also ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the 60-minute limit covered commands moved to the background with `Ctrl+B` + * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later + * Background commands owned by a [subagent](</docs/en/sub-agents>) have no time limit, except that a command owned by a subagent running in the foreground ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the former 60-minute limit on subagent commands covered commands moved to the background with `Ctrl+B` To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** @@ -569,7 +583,7 @@ Review changes with /diff -Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. In [fullscreen rendering](</docs/en/fullscreen>), `/diff` opens the diff panel beside the conversation, which stays open and updates while you keep working. In the classic renderer, `/diff` opens the diff viewer in place of the prompt, and you close it when you’re done reading. +Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. In the changes `/diff` reads from git, a submodule appears as a single entry, and only when the commit it points to changes; edits to files inside the submodule don’t appear there. In [fullscreen rendering](</docs/en/fullscreen>), `/diff` opens the diff panel beside the conversation, which stays open and updates while you keep working. In the classic renderer, `/diff` opens the diff viewer in place of the prompt, and you close it when you’re done reading. ### @@ -625,18 +639,18 @@ * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>). * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself. -Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. +Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. Key| Action ---|--- `Space`, `Enter`, `Escape`| Dismiss the answer and return to the prompt `Up` / `Down`| Scroll the answer -`Left` / `Right`| Step between this answer and your earlier `/btw` answers. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later +`Shift+Left` / `Shift+Right`| Step between this answer and your earlier `/btw` answers. `Shift+Left` moves to older answers and `Shift+Right` returns toward the current one. `[` and `]` do the same, for terminals that don’t report `Shift` with arrow keys. `Tab` / `Shift+Tab` cycle through the same answers. Requires Claude Code v2.1.257 or later. Between v2.1.187 and v2.1.256, the keys were plain `Left` / `Right` `c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text `f`| Start a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the [panel below your prompt](</docs/en/sub-agents#observe-and-steer-running-forks>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer -`/btw` sees your full conversation but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives, or, for a [fork](</docs/en/sub-agents#fork-the-current-conversation>), from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. +In an attached [background session](</docs/en/agent-view#attach-to-a-session>), `Left` detaches and returns you to agent view, even while the answer is still arriving. The side question keeps running while you’re away. The next time you attach to the session, the overlay reopens with the side question, or with its answer. Before v2.1.257, `Left` didn’t detach there. `/btw` sees your full conversation but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives, or, for a [fork](</docs/en/sub-agents#fork-the-current-conversation>), from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. ## @@ -751,13 +765,33 @@ * Yellow: any other open state * Gray: draft -The badge disappears once the merge request merges or closes. It refreshes as soon as a `glab mr create` or `git push` succeeds in the session. To get the badge, you need: +The badge disappears once the merge request merges or closes. It refreshes as soon as a `git push`, or a `glab mr` command that changes the merge request, such as `glab mr create` or `glab mr merge`, succeeds in the session. To get the badge, you need: * Claude Code v2.1.234 or later * A repository remote that points at your GitLab host, either gitlab.com or a self-managed instance * The [`glab` CLI](<https://gitlab.com/gitlab-org/cli>) on your `PATH`, authenticated with `glab auth login` Claude Code ignores `glab`’s token environment variables, such as `GITLAB_TOKEN`, when it checks status, so you get no badge from an exported token alone. Claude Code also looks for `glab` and for its login once per session, so restart Claude Code after you install `glab` or run `glab auth login`. + +## + +​ + +Issue reference links + +When Claude mentions an issue as `owner/repo#123`, you can click the reference to open it, as long as your terminal supports hyperlinks. If Claude Code doesn’t detect hyperlink support in your terminal, set [`FORCE_HYPERLINK`](</docs/en/env-vars>) to `1` to turn the links on, or to `0` to keep references as plain text. You get a link only for the two-part `owner/repo#123` form. These stay plain text: + + * A bare `#123` + * A nested GitLab path such as `group/subgroup/project#123` + * Any reference inside a code span or code block + +Claude Code builds the link for the host of the repository it identifies from your git remote, not for the repository the reference names: + +Your repository’s host| Where `owner/repo#123` links +---|--- +github.com, a GitHub Enterprise host, or any host not listed below| `https://<host>/owner/repo/issues/123` +gitlab.com| `https://gitlab.com/owner/repo/-/issues/123` +bitbucket.org, codeberg.org, or gitea.com| No link; the reference stays plain text ##
modified
Show diff (122 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -18,7 +18,7 @@ `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save -`Ctrl+L`| Redraw screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank +`Ctrl+L`| Redraw or clear the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), it also clears the screen, and you can scroll up to see the earlier messages `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands lines that collapse by default, such as MCP calls, shown as a single `Called slack 3 times` line, and [messages from your other sessions](</docs/en/cross-session-messaging#what-a-message-looks-like>), shown as a one-line `Message from @<sender>` preview `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` @@ -48,32 +48,21 @@ `Ctrl+E`| Move cursor to end of current line| In multiline input, moves to the end of the current logical line `Ctrl+K`| Delete to end of line| Stores deleted text for pasting `Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut -`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` deletes the previous word, and on Windows, `Ctrl+Backspace` does. To make `Ctrl+W` delete back to the previous whitespace instead, set `keybindingFlavor` to `"readline"` -`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, `Ctrl+W`, or, under `keybindingFlavor: "readline"`, `Alt+D` +`Ctrl+W`| Delete back to previous whitespace| Stores deleted text for pasting. One press removes a whole path or `--flag=value`. To delete only the previous word, press `Option+Delete` on macOS or `Ctrl+Backspace` on Windows +`Ctrl+Y`| Paste deleted text| Pastes the text you last deleted with one of the word or line deletion shortcuts, such as `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS -`Alt+F`| Move cursor forward one word| Moves to the start of the next word, or to the end of the current word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS -`Alt+D`| Delete next word| Deletes through the space after the word, or to the end of the word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS +`Alt+F`| Move cursor forward one word| Moves to the end of the current word, or to the end of the next word when the cursor is between words. Requires Option as Meta on macOS +`Alt+D`| Delete to end of word| Deletes to the end of the current word, or to the end of the next word when the cursor is between words. Stores deleted text for pasting. Requires Option as Meta on macOS `Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position ### ​ -Make editing keys follow readline conventions - -Set [`keybindingFlavor`](</docs/en/settings-reference#keybindingflavor>) to `"readline"` to make the prompt’s editing keys follow GNU readline conventions, as in Bash. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Under `"readline"`: - - * `Ctrl+W` deletes back to the previous whitespace. - * A word is a run of letters and digits, so punctuation such as `_`, `.`, and `/` separates words. `Alt+F` and `Alt+D` stop at the end of the current word, and `Ctrl+Y` can paste back text that `Alt+D` deleted. Before v2.1.239, Claude Code applied `"readline"` only to `Ctrl+W`. - -Add the setting to `~/.claude/settings.json`: - - { - "keybindingFlavor": "readline" - } - -To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`. This setting is separate from the [keybindings configuration file](</docs/en/keybindings>): the word-editing commands aren’t actions there, so you can’t remap them in `keybindings.json`. +Word boundaries in editing shortcuts + +The word shortcuts `Alt+B`, `Alt+F`, `Alt+D`, `Option+Delete`, and `Ctrl+Backspace` treat a word as a run of letters and digits, so punctuation such as `_`, `.`, and `/` separates words. With `src/utils/foo.ts` in the prompt, repeated presses of `Alt+B` stop at the start of `ts`, `foo`, `utils`, and `src`. `Ctrl+W` is different: it ignores punctuation and deletes back to the previous whitespace, so one press removes all of `src/utils/foo.ts`. In text written without spaces, such as Chinese or Japanese, the word shortcuts still move or delete one word at a time. These readline conventions apply in Claude Code v2.1.261 and later. The [`keybindingFlavor`](</docs/en/settings-reference#keybindingflavor>) setting that turned them on in earlier versions is deprecated and has no effect. You can’t remap these shortcuts in the [keybindings configuration file](</docs/en/keybindings>), which has no actions for them. ### @@ -345,7 +334,8 @@ * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval - * Background tasks are automatically cleaned up when Claude Code exits. If you background the session instead of exiting it, Claude Code hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) + * Background tasks are automatically cleaned up when Claude Code exits. On macOS and Linux, when you stop a background task from [`/tasks`](</docs/en/commands>) or Claude Code stops it at exit, processes that detached from the task’s shell, such as ones started under `setsid` or `timeout`, stop too + * If you background the session instead of exiting it, your background tasks keep running in the background session. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). A command owned by a subagent running in the foreground also ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the 60-minute limit covered commands moved to the background with `Ctrl+B` @@ -380,7 +370,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. +In a regular interactive session, commands you type in shell mode run outside the [sandbox](</docs/en/sandboxing>) even when you’ve enabled sandboxing, because the sandbox applies to the commands Claude runs. See [strict sandbox mode](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) for the sessions where shell-mode commands run sandboxed too, such as background sessions with strict sandbox mode on. Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. ## @@ -577,6 +567,51 @@ ​ +Review changes with /diff + +Run `/diff` to look over the changes in your working tree without leaving Claude Code. You see the edits Claude has made so far alongside anything else you haven’t committed. In [fullscreen rendering](</docs/en/fullscreen>), `/diff` opens the diff panel beside the conversation, which stays open and updates while you keep working. In the classic renderer, `/diff` opens the diff viewer in place of the prompt, and you close it when you’re done reading. + +### + +​ + +Diff panel + +The diff panel lists the changed files with their added and removed line counts, and shows each file’s diff under the list. Claude Code refreshes it each time Claude edits a file or runs a shell command. To close it, run `/diff` again or click the `✕` in its header. To use the panel you need: + + * [Fullscreen rendering](</docs/en/fullscreen>) + * A git repository + * A terminal at least 110 columns wide + * Claude Code v2.1.260 or later + +When the panel can’t open, `/diff` opens the diff viewer instead or tells you why. The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: + + * **Jump to a file** : click its row in the list. Scroll the panel with the mouse wheel. When the file list itself is too long to fit, scroll it with `Alt+Up` and `Alt+Down`, or `Ctrl+Up` and `Ctrl+Down`. + * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count next to the input until you send it. + * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. + * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each project. + +To bind keys to these actions, see [Diff panel actions](</docs/en/keybindings#diff-panel-actions>). + +### + +​ + +Diff viewer + +The diff viewer takes the place of the prompt until you close it. Its **Current** view shows your uncommitted changes from git, or, when there are none, what your branch adds on top of the default branch. The viewer also has a turn view for each prompt after which Claude edited files, showing just those edits. Claude Code builds the turn views from Claude’s file edits rather than from git, so a change Claude makes through a shell command appears only under Current. Use these keys in the viewer: + + * **Left and Right** : move between Current and the turn views. + * **Up and Down** : select a file. + * **Enter** : open the selected file’s diff. Scroll it with Up and Down, or PageUp and PageDown. + * **Esc** : return from a file’s diff to the list, or close the viewer from the list. + +To rebind these keys, see [Diff actions](</docs/en/keybindings#diff-actions>). + +## + +​ + Side questions with /btw Use `/btw` to ask a question about your current work without adding to the conversation history.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -696,14 +696,13 @@ * Red: changes requested * Gray: draft -The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. How often Claude Code refreshes the status depends on your provider: - - * **Anthropic API with[feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) on**: about every 90 seconds while you’re active in the session, and less often while you’re idle, while your terminal is unfocused, or while Claude Code keeps finding no pull request for the branch - * **Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, Claude Platform on AWS, or feature-flag fetching off** : every 60 seconds - -On either schedule, Claude Code also refreshes as soon as a `git push`, or a `gh pr` command that changes the pull request such as `gh pr create` or `gh pr merge`, succeeds in the session. After an hour without input from you, Claude Code stops refreshing, and your next prompt starts it again. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. - -PR status for GitHub repositories requires the `gh` CLI to be installed and authenticated with `gh auth login`. +The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes as soon as a `git push`, or a `gh pr` command that changes the pull request, such as `gh pr create` or `gh pr merge`, succeeds in the session. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. When you set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>), Claude Code doesn’t check pull request or merge request status. + +PR status for GitHub repositories needs a GitHub token. Claude Code finds one based on the remote’s host: + + * **github.com** : `GH_TOKEN` or `GITHUB_TOKEN`, or the token saved by `gh auth login`. Without one, the footer shows `install gh for PR status` when the `gh` CLI isn’t installed, or `gh auth login for PR status` when it is + * **A GitHub Enterprise host set as`GH_HOST`**: `GH_ENTERPRISE_TOKEN` or `GITHUB_ENTERPRISE_TOKEN`, or the token saved by `gh auth login --hostname <host>`. Without one, the footer shows the same hints + * **Any other GitHub host** : the token saved by `gh auth login --hostname <host>`. Without one, Claude Code shows no badge and no hint ### @@ -717,7 +716,7 @@ * Yellow: any other open state * Gray: draft -The badge disappears once the merge request merges or closes. Claude Code checks merge request status on the same schedule as the GitHub badge, and refreshes as soon as a `glab mr create` or `git push` succeeds in the session. To get the badge, you need: +The badge disappears once the merge request merges or closes. It refreshes as soon as a `glab mr create` or `git push` succeeds in the session. To get the badge, you need: * Claude Code v2.1.234 or later * A repository remote that points at your GitLab host, either gitlab.com or a self-managed instance
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -33,7 +33,7 @@ `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5.1 or Fable 5, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -401,7 +401,11 @@ * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends with messages still queued, Claude Code sends only the oldest as the next turn. The rest stay queued and follow the same rule: Claude Code passes them to Claude when that turn’s tool calls finish, or sends the next oldest as the turn after * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time -Press `Esc` to interrupt the turn instead. Claude Code keeps what you queued and sends it right away. +Press `Esc` to interrupt the turn instead. Claude Code keeps what you queued and sends it right away. Claude Code runs some commands as soon as you send them instead of queueing them, among them `/model`, `/effort`, and `/fast`. Each of the three changes a setting: the model, the effort level, or fast mode. Whether Claude Code applies the new setting to the turn Claude is already working on, or only from your next turn, differs by command: + + * [`/model`](</docs/en/model-config#setting-your-model>): once you confirm the [cache warning](</docs/en/prompt-caching#switching-models>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn + * [`/effort`](</docs/en/model-config#adjust-effort-level>): once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies your change to the next request it makes in that turn + * [`/fast`](</docs/en/fast-mode#toggle-fast-mode>): Claude Code keeps the fast mode setting that was active when the turn started, so your speed change applies from your next turn. If your current model doesn’t support fast mode, turning it on also [switches your model](</docs/en/prompt-caching#turning-on-fast-mode>), and Claude Code uses the new model from its next request in that turn ### @@ -430,13 +434,7 @@ When Claude Code skips suggestions -In interactive mode, Claude Code leaves prompt suggestions off by default and hides the **Prompt suggestions** toggle in `/config` when it doesn’t evaluate feature flags. That happens in these cases: - - * You use Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry as the model provider, unless a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) to a true value such as `1` - * You are signed in to a [Claude apps gateway](</docs/en/claude-apps-gateway>), or a managed settings file, MDM profile, or policy helper on your machine requires gateway sign-in with [`forceLoginMethod: "gateway"`](</docs/en/settings-reference#forceloginmethod>), even before you sign in - * You set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars#features-that-need-feature-flag-fetching>) to a value that turns off feature-flag evaluation - -Outside those cases, if you start a session before Claude Code has ever fetched feature flags, such as your first session after installing on a slow network, Claude Code can also leave suggestions off and hide the **Prompt suggestions** toggle for that session. It shows them starting with the next session after a fetch succeeds. Claude Code also skips individual suggestions in several situations, including: +In interactive mode, Claude Code leaves prompt suggestions off by default and hides the **Prompt suggestions** toggle in `/config` in a [session that doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as one on a third-party provider or through a Claude apps gateway, and in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) whose flags haven’t arrived yet. Claude Code also skips individual suggestions in several situations, including: * The prompt cache is cold, to avoid unnecessary cost * After the first turn of a conversation, in some sessions
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -164,7 +164,7 @@ Command| Action| From mode ---|---|--- -`Esc`| Enter NORMAL mode| INSERT, VISUAL +`Esc` or `Ctrl+[`| Enter NORMAL mode. In terminals that use the Kitty keyboard protocol, `Ctrl+[` requires v2.1.242 or later| INSERT, VISUAL `i`| Insert before cursor| NORMAL `I`| Insert at beginning of line| NORMAL `a`| Insert after cursor| NORMAL @@ -229,6 +229,7 @@ `dd`| Delete line `D`| Delete to end of line `dw`/`de`/`db`| Delete word/to end/back +`df{char}`/`dt{char}`| Delete to and including, or up to, the next occurrence of a character `cc`| Change line `C`| Change to end of line `cw`/`ce`/`cb`| Change word/to end/back @@ -397,7 +398,7 @@ When a queued entry reaches Claude depends on what you queued. - * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends, Claude Code sends the messages that are still queued as the next turn, each as a separate message + * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends with messages still queued, Claude Code sends only the oldest as the next turn. The rest stay queued and follow the same rule: Claude Code passes them to Claude when that turn’s tool calls finish, or sends the next oldest as the turn after * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time Press `Esc` to interrupt the turn instead. Claude Code keeps what you queued and sends it right away. @@ -432,7 +433,7 @@ In interactive mode, Claude Code leaves prompt suggestions off by default and hides the **Prompt suggestions** toggle in `/config` when it doesn’t evaluate feature flags. That happens in these cases: * You use Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry as the model provider, unless a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) to a true value such as `1` - * You are signed in to a [Claude apps gateway](</docs/en/claude-apps-gateway>) + * You are signed in to a [Claude apps gateway](</docs/en/claude-apps-gateway>), or a managed settings file, MDM profile, or policy helper on your machine requires gateway sign-in with [`forceLoginMethod: "gateway"`](</docs/en/settings-reference#forceloginmethod>), even before you sign in * You set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars#features-that-need-feature-flag-fetching>) to a value that turns off feature-flag evaluation Outside those cases, if you start a session before Claude Code has ever fetched feature flags, such as your first session after installing on a slow network, Claude Code can also leave suggestions off and hide the **Prompt suggestions** toggle for that session. It shows them starting with the next session after a fetch succeeds. Claude Code also skips individual suggestions in several situations, including: @@ -602,7 +603,7 @@ `f`| Start a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the [panel below your prompt](</docs/en/sub-agents#observe-and-steer-running-forks>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer -`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. +`/btw` sees your full conversation but has no tools. A [subagent](</docs/en/sub-agents>) has tools and starts from the prompt it receives, or, for a [fork](</docs/en/sub-agents#fork-the-current-conversation>), from a copy of this conversation. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -19,7 +19,7 @@ `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save `Ctrl+L`| Redraw screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank -`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands lines that collapse by default, such as MCP calls, shown as a single `Called slack 3 times` line, and [messages from your other sessions](</docs/en/cross-session-messaging#what-a-message-looks-like>), shown as a one-line `Message from @<sender>` preview `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -630,6 +630,64 @@ ​ +Wait for a usage limit to reset + +When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, a line at the bottom of the session shows when it will continue: + + Usage limit reached · continuing automatically at 3:45pm · esc to cancel + +Keep the session open. What happens next depends on how the wait ends: + + * **At the reset** : the line reads `continuing shortly`, then `Usage limit reset · continuing automatically`, and Claude Code sends Claude a fixed prompt to pick the task up where it stopped. It doesn’t resend your last message. + * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the line reads `Your usage limit has reset · press enter to continue`. Press `Enter` to continue. After a shorter sleep, Claude Code continues on its own. + * **Early** : when you finish adding [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) with `/usage-credits`, sign back in after `/upgrade`, or switch models with `/model` during the wait, Claude Code checks whether usage is available again and continues right away if it is. It doesn’t check after an upgrade or purchase you make in a browser on your own. Under [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on a different model, Claude Code waits for the reset instead. + +The continued task runs like any other turn. Claude Code still asks for [permissions](</docs/en/permissions>) as usual, so the task can stop on a prompt while you’re away. If it hits the limit again, Claude Code re-arms the wait on its own at most twice in a row, then stops and shows `Automatic continue stopped after repeated usage-limit hits · /rate-limit-options to try again`. + +### + +​ + +Cancel the wait + +Press `Esc` at an empty prompt, or `Ctrl+C`, while the line shows, or run [`/rate-limit-options`](</docs/en/commands#all-commands>) and pick **Don’t continue automatically**. Claude Code confirms with a line that starts `Automatic continue cancelled`. After a cancel, nothing continues until you send a prompt or pick the row that starts **Wait here, then continue automatically** from `/rate-limit-options` again. Claude Code doesn’t start a wait on its own again for that reset window; the next reset window starts fresh. The wait also ends without continuing the task in these cases: + + * **You send a prompt** : Claude Code runs your prompt instead of waiting. + * **You exit Claude Code** : the wait doesn’t restart when you resume the session. + * **The conversation changes hands** : you switch accounts with `/login`, clear or rewind the conversation, `/resume` another session, pull one with `/teleport`, relaunch with `/tui`, or hand the session to Claude Desktop, a background session, or the cloud. + * **The setting turns off, or the reset moves past 24 hours** : this ends only a wait Claude Code started on its own. A wait you picked from `/rate-limit-options` keeps counting down. + * **The continuation is blocked** : a [`UserPromptSubmit` hook](</docs/en/hooks#userpromptsubmit>) that blocks the continuation prompt, or a failure before it reaches the model, ends the wait. Claude Code tells you the continuation didn’t run. Send a prompt to continue. + +### + +​ + +Start a wait yourself + +Claude Code doesn’t start the wait on its own in these cases: + + * **Remote Control and agent team teammate sessions** : a person at that terminal can still start one. + * **A reset more than 24 hours away** : a weekly limit can reset days out. + * **An Opus or Sonnet limit while you run a model outside that family** : your next turn may not hit that limit. [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on the limited family don’t get this exception. + +In those cases, and whenever automatic continue is off, Claude Code opens the usage-limit options menu once per reset window when you hit a limit at your own terminal. Pick the row that starts **Wait here, then continue automatically** to start the wait. In a [Remote Control](</docs/en/remote-control>) or [agent team](</docs/en/agent-teams>) teammate session, run `/rate-limit-options` yourself to open the menu. Claude Code doesn’t offer the wait at all in these cases: + + * **Background sessions and`-p` runs**: the menu row isn’t available. + * **API keys, cloud providers, and usage-based billing** : usage there is metered per request, so there is no reset to wait for. + * **An[LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) without a saved claude.ai login**: Claude Code offers the wait only while a saved claude.ai login is the active credential. + +### + +​ + +Turn automatic continue off + +In `/config`, turn off **Continue automatically at usage limit** , or set [`autoContinueAtUsageLimit`](</docs/en/settings-reference#autocontinueatusagelimit>) to `false` in your user settings. `/config autoContinueAtUsageLimit=false` also works, including with `-p`, but the `key=value` form can’t turn it back on, because the setting grants unattended execution. Which settings files Claude Code reads for this key is in the [settings reference](</docs/en/settings-reference#autocontinueatusagelimit>). + +## + +​ + PR review status When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer, such as “PR #446”. The link has a colored underline indicating the review state:
modified
Show diff (174 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -4,7 +4,7 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal. +Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+D`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal. ### @@ -49,25 +49,31 @@ `Ctrl+K`| Delete to end of line| Stores deleted text for pasting `Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut `Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` deletes the previous word, and on Windows, `Ctrl+Backspace` does. To make `Ctrl+W` delete back to the previous whitespace instead, set `keybindingFlavor` to `"readline"` -`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` +`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, `Ctrl+W`, or, under `keybindingFlavor: "readline"`, `Alt+D` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS -`Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS +`Alt+F`| Move cursor forward one word| Moves to the start of the next word, or to the end of the current word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS +`Alt+D`| Delete next word| Deletes through the space after the word, or to the end of the word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS `Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position ### ​ -Make Ctrl+W delete back to whitespace - -By default, `Ctrl+W` deletes the previous word, stopping at punctuation such as `/`. Set [`keybindingFlavor`](</docs/en/settings#available-settings>) to `"readline"` to make `Ctrl+W` delete back to the previous whitespace instead, as Bash does. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Add the setting to `~/.claude/settings.json`: +Make editing keys follow readline conventions + +Set [`keybindingFlavor`](</docs/en/settings-reference#keybindingflavor>) to `"readline"` to make the prompt’s editing keys follow GNU readline conventions, as in Bash. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Under `"readline"`: + + * `Ctrl+W` deletes back to the previous whitespace. + * A word is a run of letters and digits, so punctuation such as `_`, `.`, and `/` separates words. `Alt+F` and `Alt+D` stop at the end of the current word, and `Ctrl+Y` can paste back text that `Alt+D` deleted. Before v2.1.239, Claude Code applied `"readline"` only to `Ctrl+W`. + +Add the setting to `~/.claude/settings.json`: { "keybindingFlavor": "readline" } -To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`. +To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`. This setting is separate from the [keybindings configuration file](</docs/en/keybindings>): the word-editing commands aren’t actions there, so you can’t remap them in `keybindings.json`. ### @@ -140,7 +146,7 @@ Commands -Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows everything you can invoke: built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. +Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. ## @@ -148,7 +154,7 @@ Vim editor mode -Enable vim-style editing via `/config` → Editor mode. +Enable vim-style editing via `/config` → Editor mode. Claude Code keeps your vim mode and cursor position when you toggle the transcript viewer with `Ctrl+O` or open and close a panel such as `/config`. If you leave the prompt in NORMAL mode, it’s still in NORMAL mode when you return, with the cursor where you left it. ### @@ -174,14 +180,14 @@ Remap INSERT-mode key sequences -The [`vimInsertModeRemaps`](</docs/en/settings#available-settings>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: +The [`vimInsertModeRemaps`](</docs/en/settings-reference#viminsertmoderemaps>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: { "editorMode": "vim", "vimInsertModeRemaps": { "jj": "<Esc>" } } -Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/permissions#managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes. +Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes. ### @@ -373,7 +379,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings#available-settings>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. +Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. ## @@ -449,12 +455,12 @@ To disable prompt suggestions entirely, use any of the following: * Turn off **Prompt suggestions** in `/config` - * Set [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) to `false` in your settings file + * Set [`promptSuggestionEnabled`](</docs/en/settings-reference#promptsuggestionenabled>) to `false` in your settings file * Set the [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) environment variable to `false`, which takes precedence over the setting: export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false -To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/settings#settings-files>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings#environment-variables>) key so that users can’t re-enable them with their own environment variable. +To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/managed-settings>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings-reference#env>) key so that users can’t re-enable them with their own environment variable. ## @@ -467,7 +473,7 @@ * Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:` * Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji -The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings#available-settings>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement. +The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings-reference#emojicompletionenabled>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement. ## @@ -492,7 +498,7 @@ Turn spell checking on or off -Claude Code reads the [`spellcheck`](</docs/en/settings#available-settings>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use: +Claude Code reads the [`spellcheck`](</docs/en/settings-reference#spellcheck>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use: * User settings @@ -500,7 +506,7 @@ * Managed settings -Add `spellcheck` to `~/.claude/settings.json`. It applies in every project you open, like the rest of your [user settings](</docs/en/settings#settings-files>): +Add `spellcheck` to `~/.claude/settings.json`. It applies in every project you open, like the rest of your [user settings](</docs/en/settings#where-settings-live>): { "spellcheck": { "enabled": true } @@ -582,7 +588,7 @@ * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing. * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. - * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access, fork this question and answer into their own session with `f`. + * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>). * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself. Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. @@ -593,10 +599,10 @@ `Up` / `Down`| Scroll the answer `Left` / `Right`| Step between this answer and your earlier `/btw` answers. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later `c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text -`f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only +`f`| Start a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the [panel below your prompt](</docs/en/sub-agents#observe-and-steer-running-forks>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer -`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools, while a subagent has full tools but starts with an empty context. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. +`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. ## @@ -607,6 +613,7 @@ The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. On [Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later versions of those families](</docs/en/tools-reference#task-tool-availability>), Claude keeps track of multi-step work without a written checklist, and Claude Code doesn’t provide the tools that fill this list, so it stays empty. If you’d like the task list on those models anyway, opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). On earlier models such as Opus 4.7, and after you opt in, the task list works as follows: * Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display + * If you leave the list expanded, Claude Code restores the expanded view the next time you launch into a session that still has tasks, such as with `--resume` or `--continue`. When the task list is empty, Claude Code starts it collapsed * To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks” * Tasks persist across context compactions, helping Claude stay organized on larger projects * To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude` @@ -617,7 +624,7 @@ Session recap -When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode. +When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. Claude Code caps both automatic recaps and `/recap` output at 400 characters. To turn automatic recaps off, open `/config` and turn off **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -15,10 +15,10 @@ Shortcut| Description| Context ---|---|--- `Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code -`Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control +`Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save -`Ctrl+L`| Redraw screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), if you press `Ctrl+L` once, Claude Code redraws the screen and also shows a hint that pressing it again runs `/clear`. If you press it twice within two seconds, Claude Code runs `/clear` and starts a new conversation +`Ctrl+L`| Redraw screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` @@ -27,10 +27,11 @@ `Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content `Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus +`Tab`| Accept an autocomplete suggestion, or add a comment to a permission answer| While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back -`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude +`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>) `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point -`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). +`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) @@ -47,12 +48,26 @@ `Ctrl+E`| Move cursor to end of current line| In multiline input, moves to the end of the current logical line `Ctrl+K`| Delete to end of line| Stores deleted text for pasting `Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut -`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` also deletes the previous word, and on Windows, `Ctrl+Backspace` does +`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` deletes the previous word, and on Windows, `Ctrl+Backspace` does. To make `Ctrl+W` delete back to the previous whitespace instead, set `keybindingFlavor` to `"readline"` `Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS `Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS `Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position + +### + +​ + +Make Ctrl+W delete back to whitespace + +By default, `Ctrl+W` deletes the previous word, stopping at punctuation such as `/`. Set [`keybindingFlavor`](</docs/en/settings#available-settings>) to `"readline"` to make `Ctrl+W` delete back to the previous whitespace instead, as Bash does. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Add the setting to `~/.claude/settings.json`: + + { + "keybindingFlavor": "readline" + } + +To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`. ### @@ -420,6 +435,7 @@ * After the first turn of a conversation, in some sessions * The previous response ended in an error * While you’re in plan mode + * Your account is close to or at its usage limit. To keep suggestions on until you reach the limit, set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) to `true`. Before v2.1.238, Claude Code skipped them near the limit even with the variable set to `true` * In an [agent team](</docs/en/agent-teams>), in teammates’ sessions by default. The lead’s session shows suggestions In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. @@ -434,7 +450,7 @@ * Turn off **Prompt suggestions** in `/config` * Set [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) to `false` in your settings file - * Set the `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` environment variable to `false`, which takes precedence over the setting: + * Set the [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) environment variable to `false`, which takes precedence over the setting: export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false
modified
Show diff (108 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -457,6 +457,105 @@ ​ +Check spelling as you type + +Claude Code can underline misspelled words in the prompt input while you type. It checks only the text in the input box, never Claude’s replies or your files. It also checks nothing while the input box is in shell mode, `Ctrl+R` history search, or [voice dictation](</docs/en/voice-dictation>). Spell checking is off by default, and Claude Code checks nothing in [screen reader mode](</docs/en/accessibility>). Requires Claude Code v2.1.235 or later. + +### + +​ + +Prerequisites + + * Install [aspell](<https://github.com/GNUAspell/aspell>), [hunspell](<https://github.com/hunspell/hunspell>), or [ispell](<https://en.wikipedia.org/wiki/Ispell>) and make sure it’s on your `PATH`. Claude Code runs the first of the three it finds, in that order, on every platform, including a `.cmd` shim a package manager installs on Windows. + * To check that the program is on your `PATH`, run `aspell --version`, `hunspell --version`, or `ispell -v` in your terminal. A “command not found” error means it isn’t on your `PATH` yet. + +### + +​ + +Turn spell checking on or off + +Claude Code reads the [`spellcheck`](</docs/en/settings#available-settings>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use: + + * User settings + + * Command line + + * Managed settings + +Add `spellcheck` to `~/.claude/settings.json`. It applies in every project you open, like the rest of your [user settings](</docs/en/settings#settings-files>): + + { + "spellcheck": { "enabled": true } + } + +Save `spellcheck` in a JSON file, such as `spellcheck.json`: + + { + "spellcheck": { "enabled": true } + } + +Then pass the file to `--settings`. It applies to that session only: + + claude --settings spellcheck.json + +Add `spellcheck` to one of your organization’s [managed settings sources](</docs/en/permissions#managed-settings>). It applies to every user who receives those settings, and they can’t turn it off: + + { + "spellcheck": { "enabled": true } + } + +To check that spell checking is on, type a misspelled word and a space. Claude Code underlines the word. If it doesn’t, see When Claude Code underlines nothing. To turn spell checking off again, set `enabled` to `false` in the same place, or remove `spellcheck`. To choose which of the three programs Claude Code runs, which dictionary it uses, or the underline color, add any of these fields next to `enabled`, in the same place: + + * `checker`: `aspell`, `hunspell`, or `ispell`. Claude Code doesn’t fall back from a checker you name, and treats any other value as `auto`. + * `language`: a dictionary name in your checker’s form, such as `en_GB`. Claude Code ignores any value that isn’t a plain dictionary name, such as a path or a name with spaces, and the checker uses its default dictionary. + * `color`: a color name such as `yellow`, or a `#rrggbb`, `#rgb`, `rgb(r,g,b)`, `ansi256(n)`, or `ansi:<name>` value. Claude Code uses your theme’s error color by default and for any value it doesn’t recognize. + +For example, this `spellcheck` setting runs hunspell with its `en_GB` dictionary and underlines words in yellow. It works the same in `~/.claude/settings.json`, in the file you pass to `--settings`, and in managed settings: + + { + "spellcheck": { + "enabled": true, + "checker": "hunspell", + "language": "en_GB", + "color": "yellow" + } + } + +If more than one of the three places has a `spellcheck` setting, Claude Code uses only one of them: managed settings first, then `--settings`, then user settings. It doesn’t combine fields from two places. For example, when `--settings` sets `spellcheck`, a `language` in your user settings has no effect. + +### + +​ + +What Claude Code underlines + +Shortly after you pause typing, Claude Code underlines the words the dictionary doesn’t know. It leaves the word you’re still typing alone until you move past it, and it never changes your text. It also skips text that looks like code: + + * Commands such as `/help`, `@` mentions, URLs, file paths, and flags such as `--verbose` + * Words with digits, underscores, or a capital letter after the first, and text in backticks + +Claude Code also skips Chinese, Japanese, Korean, Thai, Lao, Khmer, and Myanmar text. Claude Code has no word list of its own: a word is misspelled when your checker says so. To stop Claude Code from underlining a word, add the word to your checker’s personal dictionary, following the checker’s own documentation. Claude Code picks up the new word after you restart it. + +### + +​ + +When Claude Code underlines nothing + +Claude Code underlines nothing when it can’t keep a checker running: + + * No checker is installed, or the one you named in `checker` is missing + * The checker fails twice in a row, at startup or later in the session. Claude Code restarts it after the first failure and stops checking after the second, until you restart Claude Code + * The checker takes more than 15 seconds to answer, three times. Each time, Claude Code leaves the words it was waiting on unmarked; after the third, it stops checking until you restart Claude Code + +To find out which of these happened, start `claude --debug` with spell checking on and type a word. Then look for the `[spellcheck]` lines in the debug log at `~/.claude/debug/<session-id>.txt`. One line names the program Claude Code started, or lists the ones it looked for and didn’t find. Later lines say why it stopped. A missing-dictionary error there means the checker has no dictionary for your `language` value, or no default one when `language` is unset. Install one, or set `language` to a dictionary you have. + +## + +​ + Side questions with /btw Use `/btw` to ask a question about your current work without adding to the conversation history.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -27,8 +27,8 @@ `Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content `Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus -`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history -`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude +`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back +`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt @@ -364,6 +364,35 @@ ​ +Queue messages while Claude works + +Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries above the input box until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. + +### + +​ + +When Claude Code sends what you queued + +When a queued entry reaches Claude depends on what you queued. + + * Messages: if you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, within the same turn. When the turn ends, Claude Code sends the messages that are still queued as the next turn, each as a separate message + * Commands and shell commands: Claude Code holds them until the turn ends, then runs them one at a time + +Press `Esc` to interrupt the turn instead. Claude Code keeps what you queued and sends it right away. + +### + +​ + +Take back what you queued + +Press `Up` from the first line of the input box to take back the queued messages and commands. Claude Code removes them from the queue and puts them in the input box, one per line, ahead of any text you had typed. Edit the text and press `Enter` to queue it again as one entry, or clear the input box to drop it. Claude Code takes back queued shell commands only when the input box is empty and you have nothing else queued, and it switches the input box to shell mode when it does. Otherwise it leaves them in the queue, listed with their `!` prefix, and runs them after the turn ends. + +## + +​ + Prompt suggestions When you first open a session, Claude Code shows a grayed-out example command in the prompt input to help you get started. It picks this from your project’s git history, so the example reflects files you’ve been working on recently. After Claude responds, Claude Code can suggest your next prompt based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. @@ -488,9 +517,34 @@ * Red: changes requested * Gray: draft -The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. - -PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`). +The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. How often Claude Code refreshes the status depends on your provider: + + * **Anthropic API with[feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) on**: about every 90 seconds while you’re active in the session, and less often while you’re idle, while your terminal is unfocused, or while Claude Code keeps finding no pull request for the branch + * **Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, Claude Platform on AWS, or feature-flag fetching off** : every 60 seconds + +On either schedule, Claude Code also refreshes as soon as a `git push`, or a `gh pr` command that changes the pull request such as `gh pr create` or `gh pr merge`, succeeds in the session. After an hour without input from you, Claude Code stops refreshing, and your next prompt starts it again. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. + +PR status for GitHub repositories requires the `gh` CLI to be installed and authenticated with `gh auth login`. + +### + +​ + +GitLab merge requests + +When you work on a branch with an open GitLab merge request, Claude Code shows a clickable `MR !N` badge in the footer slot that otherwise holds the GitHub PR link. `!N` is GitLab’s own reference syntax for merge request number N. The colored underline shows the merge request’s state: + + * Green: GitLab reports the merge request as mergeable + * Yellow: any other open state + * Gray: draft + +The badge disappears once the merge request merges or closes. Claude Code checks merge request status on the same schedule as the GitHub badge, and refreshes as soon as a `glab mr create` or `git push` succeeds in the session. To get the badge, you need: + + * Claude Code v2.1.234 or later + * A repository remote that points at your GitLab host, either gitlab.com or a self-managed instance + * The [`glab` CLI](<https://gitlab.com/gitlab-org/cli>) on your `PATH`, authenticated with `glab auth login` + +Claude Code ignores `glab`’s token environment variables, such as `GITLAB_TOKEN`, when it checks status, so you get no badge from an exported token alone. Claude Code also looks for `glab` and for its login once per session, so restart Claude Code after you install `glab` or run `glab auth login`. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -30,7 +30,7 @@ `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point -`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). +`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) @@ -460,7 +460,7 @@ Task list -The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. +The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. On [Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later versions of those families](</docs/en/tools-reference#task-tool-availability>), Claude keeps track of multi-step work without a written checklist, and Claude Code doesn’t provide the tools that fill this list, so it stays empty. If you’d like the task list on those models anyway, opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). On earlier models such as Opus 4.7, and after you opt in, the task list works as follows: * Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display * To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks”
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -88,7 +88,7 @@ ---|---|--- `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it -`@`| File path mention| Trigger file path autocomplete +`@`| File path mention| Trigger file path autocomplete. In sessions with [cross-session messaging](</docs/en/cross-session-messaging#message-another-session>), when you type at least one letter after the `@`, Claude Code also suggests your other live sessions on this machine, so you can tell Claude to message the one you pick. Requires Claude Code v2.1.232 or later `:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later `?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character @@ -366,12 +366,42 @@ Prompt suggestions -When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. +When you first open a session, Claude Code shows a grayed-out example command in the prompt input to help you get started. It picks this from your project’s git history, so the example reflects files you’ve been working on recently. After Claude responds, Claude Code can suggest your next prompt based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. * Press `Tab` or `Right arrow` to place the suggestion in the prompt input, then `Enter` to submit * Start typing to dismiss it -The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, use any of the following: +Claude Code generates each of these next-prompt suggestions with a background request that reuses the conversation’s prompt cache, so the additional cost is minimal. + +### + +​ + +When Claude Code skips suggestions + +In interactive mode, Claude Code leaves prompt suggestions off by default and hides the **Prompt suggestions** toggle in `/config` when it doesn’t evaluate feature flags. That happens in these cases: + + * You use Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry as the model provider, unless a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) to a true value such as `1` + * You are signed in to a [Claude apps gateway](</docs/en/claude-apps-gateway>) + * You set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars#features-that-need-feature-flag-fetching>) to a value that turns off feature-flag evaluation + +Outside those cases, if you start a session before Claude Code has ever fetched feature flags, such as your first session after installing on a slow network, Claude Code can also leave suggestions off and hide the **Prompt suggestions** toggle for that session. It shows them starting with the next session after a fetch succeeds. Claude Code also skips individual suggestions in several situations, including: + + * The prompt cache is cold, to avoid unnecessary cost + * After the first turn of a conversation, in some sessions + * The previous response ended in an error + * While you’re in plan mode + * In an [agent team](</docs/en/agent-teams>), in teammates’ sessions by default. The lead’s session shows suggestions + +In print mode, Claude Code doesn’t generate suggestions by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. + +### + +​ + +Turn prompt suggestions off + +To disable prompt suggestions entirely, use any of the following: * Turn off **Prompt suggestions** in `/config` * Set [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) to `false` in your settings file
modified
Show diff (157 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -4,13 +4,7 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal: - - * **iTerm2** : Settings → Profiles → Keys → General → set Left/Right Option key to “Esc+” - * **Apple Terminal** : Settings → Profiles → Keyboard → check “Use Option as Meta Key” - * **VS Code** : set `"terminal.integrated.macOptionIsMeta": true` in VS Code settings - -See [Terminal configuration](</docs/en/terminal-config>) for details. +Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal. ### @@ -33,9 +27,9 @@ `Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content `Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus -`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline -`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude. Before v2.1.202, `Esc` on some dialogs interrupted Claude and left the dialog open -`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point. Before v2.1.216, double `Esc` at an empty prompt could stop opening the menu for the rest of a long-running session that used background tasks +`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history +`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude +`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta @@ -80,11 +74,9 @@ ---|---|--- Quick escape| `\` \+ `Enter`| Works in all terminals Option key| `Option+Enter`| After enabling [Option as Meta](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) on macOS -Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal +Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal. For other terminals, see [Enter multiline prompts](</docs/en/terminal-config#enter-multiline-prompts>) Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs - -Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. For VS Code, Cursor, Devin Desktop, Alacritty, and Zed, run `/terminal-setup` to install the binding. ### @@ -98,7 +90,7 @@ `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete `:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later -`?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character. Before v2.1.211, an edit that left a lone `?` in the input, such as backspacing from `?x`, also toggled the panel and discarded the edit +`?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character ### @@ -106,7 +98,7 @@ Transcript viewer -When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. Run `/tui` with no argument to check which renderer is active. In [fullscreen rendering](</docs/en/fullscreen>), press `?` to show the full shortcut reference panel inside the viewer. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). +When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. Run `/tui` with no argument to check which renderer is active. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). Shortcut| Description ---|--- @@ -200,7 +192,7 @@ `T{char}`| Jump to just after previous occurrence of character `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse -`/`| Open reverse history search, same as `Ctrl+R`. As of v2.1.191, the empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead +`/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode. @@ -229,7 +221,7 @@ `<<`| Dedent line `J`| Join lines `u`| Undo -`.`| Repeat last change. Before v2.1.216, repeating a change operator such as `cw` or `cc` replayed only the inserted text without the deletion, and `.` after `p`/`P` repeated the previous change instead of the paste +`.`| Repeat last change ### @@ -284,7 +276,6 @@ * Input history is stored per working directory * Running `/clear` starts a new session: recall then lists the new session’s prompts first, with earlier sessions’ prompts after them. The previous session’s conversation is preserved and can be resumed. * Submitting the same prompt twice in a row records one history entry, so pressing Up steps to the previous distinct prompt - * Use Up/Down arrows to navigate (see keyboard shortcuts above) * When you recall a prompt that included pasted text, Claude Code sends the full pasted content again when you resubmit. If the content has since been [cleaned up](</docs/en/claude-directory#cleaned-up-automatically>), Claude Code doesn’t send the literal `[Pasted text #N]` string; see [Paste large content](</docs/en/terminal-config#paste-large-content>) for what happens to the prompt * History expansion with `!` is disabled by default @@ -307,7 +298,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -The inline search scans your full prompt history, newest first, with duplicates collapsed to the newest occurrence. The fullscreen dialog lists the 100 most recent unique prompts in the selected scope. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. Before v2.1.202, accepting or canceling during that load could report an internal error. +The inline search scans your full prompt history, newest first, with duplicates collapsed to the newest occurrence. The fullscreen dialog searches your whole prompt history in the selected scope, newest first, with duplicates collapsed to the newest occurrence: the most recent prompts appear immediately, and matches from older prompts fill in as Claude Code loads the rest. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. ## @@ -334,7 +325,7 @@ * Background tasks have unique IDs for tracking and output retrieval * Background tasks are automatically cleaned up when Claude Code exits. If you background the session instead of exiting it, Claude Code hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why - * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). Before v2.1.218, neither limit covered commands moved to the background with `Ctrl+B` + * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). A command owned by a subagent running in the foreground also ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the 60-minute limit covered commands moved to the background with `Ctrl+B` To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** @@ -367,7 +358,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -As of v2.1.186, Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings#available-settings>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. This is useful for quick shell operations while maintaining conversation context. +Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings#available-settings>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. ## @@ -409,24 +400,24 @@ Side questions with /btw -Use `/btw` to ask a quick question about your current work without adding to the conversation history. This is useful when you want a fast answer but don’t want to clutter the main context or derail Claude from a long-running task. +Use `/btw` to ask a question about your current work without adding to the conversation history. /btw what was the name of that config file again? -Side questions have full visibility into the current conversation, so you can ask about code Claude has already read, decisions it made earlier, or anything else from the session. The question and answer are ephemeral: they appear in a dismissible overlay and never enter the conversation history. - - * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. +Claude answers a side question from what’s already in the conversation: your messages, its replies, and the tool results it has gathered. You can ask about code Claude has already read, decisions it made earlier, or anything else from the session. A later side question also sees your earlier side questions: Claude Code replays the newest 20 exchanges with each ask, until you clear them. The question and answer never enter the conversation history. In the terminal, they appear in a dismissible overlay. The terminal keeps the thread in memory: press `x` to clear the earlier exchanges, and it’s gone when you exit Claude Code. In the [VS Code extension](</docs/en/vs-code#use-the-prompt-box>)’s chat panel, `/btw` opens a panel rather than the overlay this section describes, and you ask follow-up questions right in the panel. The panel’s thread survives window reloads, on the retention schedule that page describes. You need the extension at v2.1.227 or later. Earlier extension versions don’t offer `/btw`. + + * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing. * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. - * **Single response** : there are no follow-up turns in the overlay. To continue the thread, fork it into its own session with `f`. - * **Low cost** : the side question reuses the parent conversation’s prompt cache, so the additional cost is minimal. - -Earlier side questions from the same session appear as a dimmed list above the current answer. They stay out of the conversation history but remain visible in the overlay until you clear them. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. + * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access, fork this question and answer into their own session with `f`. + * **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself. + +Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. Key| Action ---|--- `Space`, `Enter`, `Escape`| Dismiss the answer and return to the prompt `Up` / `Down`| Scroll the answer -`Left` / `Right`| Step between this answer and your earlier `/btw` answers from the session. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later +`Left` / `Right`| Step between this answer and your earlier `/btw` answers. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later `c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text `f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer @@ -467,7 +458,7 @@ * Red: changes requested * Gray: draft -The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. Before v2.1.217, the badge was a hyperlink only when detection succeeded. +The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`).
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -380,9 +380,15 @@ * Press `Tab` or `Right arrow` to place the suggestion in the prompt input, then `Enter` to submit * Start typing to dismiss it -The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: - - export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false +The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, use any of the following: + + * Turn off **Prompt suggestions** in `/config` + * Set [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) to `false` in your settings file + * Set the `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` environment variable to `false`, which takes precedence over the setting: + + export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false + +To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/settings#settings-files>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings#environment-variables>) key so that users can’t re-enable them with their own environment variable. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -38,7 +38,7 @@ `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point. Before v2.1.216, double `Esc` at an empty prompt could stop opening the menu for the rest of a long-running session that used background tasks `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ### @@ -279,12 +279,13 @@ Command history -Claude Code maintains command history for the current session: +Claude Code keeps a history of the prompts you type, and Up-arrow recall reaches prompts from past sessions of the same project: * Input history is stored per working directory - * Input history resets when you run `/clear` to start a new session. The previous session’s conversation is preserved and can be resumed. + * Running `/clear` starts a new session: recall then lists the new session’s prompts first, with earlier sessions’ prompts after them. The previous session’s conversation is preserved and can be resumed. * Submitting the same prompt twice in a row records one history entry, so pressing Up steps to the previous distinct prompt * Use Up/Down arrows to navigate (see keyboard shortcuts above) + * When you recall a prompt that included pasted text, Claude Code sends the full pasted content again when you resubmit. If the content has since been [cleaned up](</docs/en/claude-directory#cleaned-up-automatically>), Claude Code doesn’t send the literal `[Pasted text #N]` string; see [Paste large content](</docs/en/terminal-config#paste-large-content>) for what happens to the prompt * History expansion with `!` is disabled by default ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -112,7 +112,7 @@ ---|--- `?`| Toggle the keyboard shortcut help panel. Requires [fullscreen rendering](</docs/en/fullscreen>) `{` / `}`| Jump to the previous or next user prompt, like vim paragraph motion. Requires [fullscreen rendering](</docs/en/fullscreen>) -`Ctrl+E`| Toggle show all content. Available in the default renderer only, not in [fullscreen rendering](</docs/en/fullscreen>) +`Ctrl+E`| Toggle show all content. Available in the classic renderer only, not in [fullscreen rendering](</docs/en/fullscreen>) `[`| Write the full conversation to your terminal’s native scrollback so `Cmd+F`, tmux copy mode, and other native tools can search it. Requires [fullscreen rendering](</docs/en/fullscreen#search-and-review-the-conversation>) `v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>) `q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>) @@ -293,7 +293,7 @@ Reverse search with Ctrl+R -Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the default inline search: +Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search: 1. **Start search** : press `Ctrl+R` to activate reverse history search 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -331,7 +331,7 @@ * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval - * Background tasks are automatically cleaned up when Claude Code exits. Backgrounding the session instead of exiting it hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) + * Background tasks are automatically cleaned up when Claude Code exits. If you background the session instead of exiting it, Claude Code hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). Before v2.1.218, neither limit covered commands moved to the background with `Ctrl+B`
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -202,7 +202,7 @@ `,`| Repeat last f/F/t/T motion in reverse `/`| Open reverse history search, same as `Ctrl+R`. As of v2.1.191, the empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead -In vim normal mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and the arrow keys navigate command history instead. +In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -24,7 +24,7 @@ `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save -`Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank +`Ctrl+L`| Redraw screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), if you press `Ctrl+L` once, Claude Code redraws the screen and also shows a hint that pressing it again runs `/clear`. If you press it twice within two seconds, Claude Code runs `/clear` and starts a new conversation `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V`
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -53,7 +53,7 @@ `Ctrl+E`| Move cursor to end of current line| In multiline input, moves to the end of the current logical line `Ctrl+K`| Delete to end of line| Stores deleted text for pasting `Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut -`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On Windows, `Ctrl+Backspace` also deletes the previous word +`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` also deletes the previous word, and on Windows, `Ctrl+Backspace` does `Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS @@ -97,6 +97,7 @@ `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete +`:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later `?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character. Before v2.1.211, an edit that left a lone `?` in the input, such as backspacing from `?x`, also toggled the panel and discarded the edit ### @@ -332,7 +333,7 @@ * Background tasks have unique IDs for tracking and output retrieval * Background tasks are automatically cleaned up when Claude Code exits. Backgrounding the session instead of exiting it hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why - * As of v2.1.193, on macOS and Linux, running background tasks are terminated when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes with no turn or subagent running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off + * On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](</docs/en/sub-agents>) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](</docs/en/env-vars>). Before v2.1.218, neither limit covered commands moved to the background with `Ctrl+B` To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** @@ -386,6 +387,19 @@ ​ +Emoji shortcodes + +Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. Requires Claude Code v2.1.217 or later. + + * Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:` + * Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji + +The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings#available-settings>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement. + +## + +​ + Side questions with /btw Use `/btw` to ask a quick question about your current work without adding to the conversation history. This is useful when you want a fast answer but don’t want to clutter the main context or derail Claude from a long-running task. @@ -446,7 +460,7 @@ * Red: changes requested * Gray: draft -The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. +The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. Claude Code renders the badge as a hyperlink even when it can’t detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](</docs/en/env-vars>) to render the badge as plain text. Before v2.1.217, the badge was a hyperlink only when detection succeeded. PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`).
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -35,7 +35,7 @@ `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude. Before v2.1.202, `Esc` on some dialogs interrupted Claude and left the dialog open -`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point +`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point. Before v2.1.216, double `Esc` at an empty prompt could stop opening the menu for the rest of a long-running session that used background tasks `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta @@ -228,7 +228,7 @@ `<<`| Dedent line `J`| Join lines `u`| Undo -`.`| Repeat last change +`.`| Repeat last change. Before v2.1.216, repeating a change operator such as `cw` or `cc` replayed only the inserted text without the deletion, and `.` after `p`/`P` repeated the previous change instead of the paste ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -399,7 +399,7 @@ * **Single response** : there are no follow-up turns in the overlay. To continue the thread, fork it into its own session with `f`. * **Low cost** : the side question reuses the parent conversation’s prompt cache, so the additional cost is minimal. -Earlier side questions from the same session appear as a dimmed list above the current answer. They stay out of the conversation history but remain visible in the overlay until you clear them. Once the answer appears, the overlay accepts these keys. +Earlier side questions from the same session appear as a dimmed list above the current answer. They stay out of the conversation history but remain visible in the overlay until you clear them. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys. Key| Action ---|---
modified
Show diff (110 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -4,7 +4,7 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: +Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal: * **iTerm2** : Settings → Profiles → Keys → General → set Left/Right Option key to “Esc+” * **Apple Terminal** : Settings → Profiles → Keyboard → check “Use Option as Meta Key” @@ -22,19 +22,21 @@ ---|---|--- `Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control -`Ctrl+D`| Exit Claude Code session| EOF signal -`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save +`Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead +`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save `Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents +`Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content +`Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline `Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude. Before v2.1.202, `Esc` on some dialogs interrupted Claude and left the dialog open `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point -`Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). +`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) @@ -56,6 +58,7 @@ `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS `Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS +`Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position ### @@ -94,6 +97,7 @@ `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete +`?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character. Before v2.1.211, an edit that left a lone `?` in the input, such as backspacing from `?x`, also toggled the panel and discarded the edit ### @@ -101,13 +105,13 @@ Transcript viewer -When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. In [fullscreen rendering](</docs/en/fullscreen>), press `?` to show the full shortcut reference panel inside the viewer. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). +When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. Run `/tui` with no argument to check which renderer is active. In [fullscreen rendering](</docs/en/fullscreen>), press `?` to show the full shortcut reference panel inside the viewer. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). Shortcut| Description ---|--- `?`| Toggle the keyboard shortcut help panel. Requires [fullscreen rendering](</docs/en/fullscreen>) `{` / `}`| Jump to the previous or next user prompt, like vim paragraph motion. Requires [fullscreen rendering](</docs/en/fullscreen>) -`Ctrl+E`| Toggle show all content +`Ctrl+E`| Toggle show all content. Available in the default renderer only, not in [fullscreen rendering](</docs/en/fullscreen>) `[`| Write the full conversation to your terminal’s native scrollback so `Cmd+F`, tmux copy mode, and other native tools can search it. Requires [fullscreen rendering](</docs/en/fullscreen#search-and-review-the-conversation>) `v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>) `q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>) @@ -214,6 +218,8 @@ `cc`| Change line `C`| Change to end of line `cw`/`ce`/`cb`| Change word/to end/back +`s`| Substitute character: delete the character under the cursor and enter INSERT mode. Requires Claude Code v2.1.211 or later +`S`| Substitute line: clear the line and enter INSERT mode. Requires Claude Code v2.1.211 or later `yy`/`Y`| Yank (copy) line `yw`/`ye`/`yb`| Yank word/to end/back `p`| Paste after cursor @@ -286,12 +292,12 @@ Reverse search with Ctrl+R -Press `Ctrl+R` to interactively search through your command history: +Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the default inline search: 1. **Start search** : press `Ctrl+R` to activate reverse history search 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results 3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches - 4. **Change scope** : search defaults to prompts from all projects. Press `Ctrl+S` to cycle the scope through this session, this project, and all projects + 4. **Search scope** : the inline search always searches prompts from all projects 5. **Accept match** : * Press `Tab` or `Esc` to accept the current match and continue editing * Press `Enter` to accept and execute the command immediately @@ -299,7 +305,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -The search loads the 100 most recent unique prompts in the selected scope, with duplicates collapsed to the newest occurrence. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. Before v2.1.202, accepting or canceling during that load could report an internal error. +The inline search scans your full prompt history, newest first, with duplicates collapsed to the newest occurrence. The fullscreen dialog lists the 100 most recent unique prompts in the selected scope. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. Before v2.1.202, accepting or canceling during that load could report an internal error. ## @@ -372,7 +378,7 @@ * Press `Tab` or `Right arrow` to place the suggestion in the prompt input, then `Enter` to submit * Start typing to dismiss it -The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `--output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: +The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `-p "<prompt>" --output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -128,7 +128,7 @@ Commands -Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows everything you can invoke: built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. +Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows everything you can invoke: built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -25,7 +25,7 @@ `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save `Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank -`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice @@ -155,6 +155,21 @@ `O`| Open line above| NORMAL `v`| Start character-wise visual selection| NORMAL `V`| Start line-wise visual selection| NORMAL + +### + +​ + +Remap INSERT-mode key sequences + +The [`vimInsertModeRemaps`](</docs/en/settings#available-settings>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape: + + { + "editorMode": "vim", + "vimInsertModeRemaps": { "jj": "<Esc>" } + } + +Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/permissions#managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -32,7 +32,7 @@ `Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline -`Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far +`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude. Before v2.1.202, `Esc` on some dialogs interrupted Claude and left the dialog open `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt @@ -284,7 +284,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -The search loads the 100 most recent unique prompts in the selected scope, with duplicates collapsed to the newest occurrence. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. +The search loads the 100 most recent unique prompts in the selected scope, with duplicates collapsed to the newest occurrence. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. Before v2.1.202, accepting or canceling during that load could report an internal error. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -34,7 +34,7 @@ `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline `Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point -`Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). +`Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>)
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -29,7 +29,7 @@ `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice -`Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area +`Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline `Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far @@ -397,9 +397,9 @@ Task list -When working on complex, multi-step work, Claude creates a task list to track progress. Tasks appear in the status area of your terminal with indicators showing what’s pending, in progress, or complete. - - * Press `Ctrl+T` to toggle the task list view. The display shows up to 5 tasks at a time +The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. + + * Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display * To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks” * Tasks persist across context compactions, helping Claude stay organized on larger projects * To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude`
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -309,8 +309,9 @@ * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval - * Background tasks are automatically cleaned up when Claude Code exits + * Background tasks are automatically cleaned up when Claude Code exits. Backgrounding the session instead of exiting it hands them to the background session, where they keep running. See [background a running session](</docs/en/agent-view#from-inside-a-session>) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why + * As of v2.1.193, on macOS and Linux, running background tasks are terminated when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes with no turn or subagent running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn this off To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** @@ -339,6 +340,7 @@ * Supports the same `Ctrl+B` backgrounding for long-running commands * Doesn’t require Claude to interpret or approve the command * Supports history-based autocomplete: type a partial command and press `Tab` to complete from previous `!` commands in the current project + * Supports live file path autocomplete as of v2.1.193 on all platforms: type a token containing a forward slash, such as `./src/` or `~/`, to see a dropdown of matching files and directories, then press `Tab` to accept. Use forward slashes on Windows too; the dropdown is triggered by `/`, not `\` * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior
modified
Show diff (104 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -28,7 +28,7 @@ `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` -`Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice +`Ctrl+B`| Background running tasks| Backgrounds Bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline @@ -182,7 +182,7 @@ `,`| Repeat last f/F/t/T motion in reverse `/`| Open reverse history search, same as `Ctrl+R`. As of v2.1.191, the empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead -In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, `j`/`k` and the arrow keys navigate command history instead. +In vim normal mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and the arrow keys navigate command history instead. ### @@ -263,7 +263,7 @@ * Input history resets when you run `/clear` to start a new session. The previous session’s conversation is preserved and can be resumed. * Submitting the same prompt twice in a row records one history entry, so pressing Up steps to the previous distinct prompt * Use Up/Down arrows to navigate (see keyboard shortcuts above) - * **Note** : history expansion (`!`) is disabled by default + * History expansion with `!` is disabled by default ### @@ -290,9 +290,9 @@ ​ -Background bash commands - -Claude Code supports running bash commands in the background, allowing you to continue working while long-running processes execute. +Background Bash commands + +Claude Code supports running Bash commands in the background, allowing you to continue working while long-running processes execute. ### @@ -303,7 +303,7 @@ When Claude Code runs a command in the background, it runs the command asynchronously and immediately returns a background task ID. Claude Code can respond to new prompts while the command continues executing in the background. To run commands in the background, you can either: * Prompt Claude Code to run a command in the background - * Press Ctrl+B to move a regular Bash tool invocation to the background. (Tmux users must press Ctrl+B twice due to tmux’s prefix key.) + * Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key. **Key features:** @@ -337,8 +337,8 @@ * Adds the command and its output to the conversation context * Shows real-time progress and output * Supports the same `Ctrl+B` backgrounding for long-running commands - * Does not require Claude to interpret or approve the command - * Supports history-based autocomplete: type a partial command and press **Tab** to complete from previous `!` commands in the current project + * Doesn’t require Claude to interpret or approve the command + * Supports history-based autocomplete: type a partial command and press `Tab` to complete from previous `!` commands in the current project * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior @@ -352,7 +352,7 @@ When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. - * Press **Tab** or **Right arrow** to place the suggestion in the prompt input, then **Enter** to submit + * Press `Tab` or `Right arrow` to place the suggestion in the prompt input, then `Enter` to submit * Start typing to dismiss it The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `--output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: @@ -371,12 +371,12 @@ Side questions have full visibility into the current conversation, so you can ask about code Claude has already read, decisions it made earlier, or anything else from the session. The question and answer are ephemeral: they appear in a dismissible overlay and never enter the conversation history. - * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and does not interrupt the main turn. - * **No tool access** : side questions answer only from what is already in context. Claude cannot read files, run commands, or search when answering a side question. + * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. + * **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question. * **Single response** : there are no follow-up turns in the overlay. To continue the thread, fork it into its own session with `f`. * **Low cost** : the side question reuses the parent conversation’s prompt cache, so the additional cost is minimal. -Once the answer appears, the overlay accepts these keys. Earlier side questions from the same session appear as a dimmed list above the current answer; they stay out of the conversation history but remain visible in the overlay until you clear them. +Earlier side questions from the same session appear as a dimmed list above the current answer. They stay out of the conversation history but remain visible in the overlay until you clear them. Once the answer appears, the overlay accepts these keys. Key| Action ---|--- @@ -416,14 +416,14 @@ PR review status -When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer (for example, “PR #446”). The link has a colored underline indicating the review state: +When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer, such as “PR #446”. The link has a colored underline indicating the review state: * Green: approved * Yellow: pending review * Red: changes requested * Gray: draft -The badge disappears once the pull request merges or closes. `Cmd+click` (Mac) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. +The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`).
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -180,7 +180,7 @@ `T{char}`| Jump to just after previous occurrence of character `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse -`/`| Open reverse history search, same as `Ctrl+R` +`/`| Open reverse history search, same as `Ctrl+R`. As of v2.1.191, the empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, `j`/`k` and the arrow keys navigate command history instead. @@ -284,7 +284,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -The search displays matching commands with the search term highlighted, so you can find and reuse previous inputs. +The search loads the 100 most recent unique prompts in the selected scope, with duplicates collapsed to the newest occurrence. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. ## @@ -382,6 +382,7 @@ ---|--- `Space`, `Enter`, `Escape`| Dismiss the answer and return to the prompt `Up` / `Down`| Scroll the answer +`Left` / `Right`| Step between this answer and your earlier `/btw` answers from the session. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later `c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text `f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -92,7 +92,7 @@ Shortcut| Description| Notes ---|---|--- `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) -`!` at start| Shell mode| Run commands directly and add execution output to the session +`!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete ### @@ -342,7 +342,7 @@ * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior -This is useful for quick shell operations while maintaining conversation context. +As of v2.1.186, Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings#available-settings>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response. This is useful for quick shell operations while maintaining conversation context. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -21,7 +21,7 @@ Shortcut| Description| Context ---|---|--- `Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code -`Ctrl+X Ctrl+K`| Kill all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control +`Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save `Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -31,12 +31,12 @@ `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus -`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history +`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. As of v2.1.169, wrapped single-line input behaves the same as multiline `Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far `Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -382,6 +382,7 @@ ---|--- `Space`, `Enter`, `Escape`| Dismiss the answer and return to the prompt `Up` / `Down`| Scroll the answer +`c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text `f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only `x`| Clear the list of earlier `/btw` exchanges shown above the current answer
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -1,9 +1,3 @@ -> ## Documentation Index -> -> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt> -> -> Use this file to discover all available pages before exploring further. - ## ​
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -87,7 +87,7 @@ Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs -Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. For VS Code, Cursor, Windsurf, Alacritty, and Zed, run `/terminal-setup` to install the binding. +Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. For VS Code, Cursor, Devin Desktop, Alacritty, and Zed, run `/terminal-setup` to install the binding. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -33,7 +33,7 @@ `Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively -`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt +`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -361,7 +361,7 @@ * Press **Tab** or **Right arrow** to place the suggestion in the prompt input, then **Enter** to submit * Start typing to dismiss it -The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: +The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `--output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -186,6 +186,7 @@ `T{char}`| Jump to just after previous occurrence of character `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse +`/`| Open reverse history search, same as `Ctrl+R` In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, `j`/`k` and the arrow keys navigate command history instead. @@ -378,10 +379,19 @@ * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and does not interrupt the main turn. * **No tool access** : side questions answer only from what is already in context. Claude cannot read files, run commands, or search when answering a side question. - * **Single response** : there are no follow-up turns. If you need a back-and-forth, use a normal prompt instead. + * **Single response** : there are no follow-up turns in the overlay. To continue the thread, fork it into its own session with `f`. * **Low cost** : the side question reuses the parent conversation’s prompt cache, so the additional cost is minimal. -Press **Space** , **Enter** , or **Escape** to dismiss the answer and return to the prompt. `/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools, while a subagent has full tools but starts with an empty context. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. +Once the answer appears, the overlay accepts these keys. Earlier side questions from the same session appear as a dimmed list above the current answer; they stay out of the conversation history but remain visible in the overlay until you clear them. + +Key| Action +---|--- +`Space`, `Enter`, `Escape`| Dismiss the answer and return to the prompt +`Up` / `Down`| Scroll the answer +`f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only +`x`| Clear the list of earlier `/btw` exchanges shown above the current answer + +`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools, while a subagent has full tools but starts with an empty context. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -266,6 +266,7 @@ * Input history is stored per working directory * Input history resets when you run `/clear` to start a new session. The previous session’s conversation is preserved and can be resumed. + * Submitting the same prompt twice in a row records one history entry, so pressing Up steps to the previous distinct prompt * Use Up/Down arrows to navigate (see keyboard shortcuts above) * **Note** : history expansion (`!`) is disabled by default
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -26,7 +26,7 @@ Shortcut| Description| Context ---|---|--- -`Ctrl+C`| Cancel current input or generation| Standard interrupt +`Ctrl+C`| Interrupt, or clear input| Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code `Ctrl+X Ctrl+K`| Kill all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save @@ -39,7 +39,7 @@ `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history `Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far -`Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message +`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -415,9 +415,8 @@ * Yellow: pending review * Red: changes requested * Gray: draft - * Purple: merged - -`Cmd+click` (Mac) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status updates automatically every 60 seconds. + +The badge disappears once the pull request merges or closes. `Cmd+click` (Mac) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`).
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -10,7 +10,7 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: +Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: * **iTerm2** : Settings → Profiles → Keys → General → set Left/Right Option key to “Esc+” * **Apple Terminal** : Settings → Profiles → Keyboard → check “Use Option as Meta Key” @@ -27,7 +27,7 @@ Shortcut| Description| Context ---|---|--- `Ctrl+C`| Cancel current input or generation| Standard interrupt -`Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control +`Ctrl+X Ctrl+K`| Kill all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save `Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank @@ -38,6 +38,7 @@ `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history +`Esc`| Interrupt Claude| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far `Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt @@ -106,10 +107,12 @@ Transcript viewer -When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). +When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. In [fullscreen rendering](</docs/en/fullscreen>), press `?` to show the full shortcut reference panel inside the viewer. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). Shortcut| Description ---|--- +`?`| Toggle the keyboard shortcut help panel. Requires [fullscreen rendering](</docs/en/fullscreen>) +`{` / `}`| Jump to the previous or next user prompt, like vim paragraph motion. Requires [fullscreen rendering](</docs/en/fullscreen>) `Ctrl+E`| Toggle show all content `[`| Write the full conversation to your terminal’s native scrollback so `Cmd+F`, tmux copy mode, and other native tools can search it. Requires [fullscreen rendering](</docs/en/fullscreen#search-and-review-the-conversation>) `v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>)
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -353,7 +353,7 @@ When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. - * Press **Tab** or **Right arrow** to accept the suggestion, or press **Enter** to accept and submit + * Press **Tab** or **Right arrow** to place the suggestion in the prompt input, then **Enter** to submit * Start typing to dismiss it The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`:
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -10,7 +10,7 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`, `Alt+T`) require configuring Option as Meta in your terminal: +Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: * **iTerm2** : Settings → Profiles → Keys → General → set Left/Right Option key to “Esc+” * **Apple Terminal** : Settings → Profiles → Keyboard → check “Use Option as Meta Key” @@ -41,7 +41,7 @@ `Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. On macOS, configure your terminal to send Option as Meta for this shortcut to work +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. As of v2.1.132 this shortcut works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ### @@ -82,11 +82,11 @@ ---|---|--- Quick escape| `\` \+ `Enter`| Works in all terminals Option key| `Option+Enter`| After enabling [Option as Meta](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) on macOS -Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal +Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs -Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, and Apple Terminal. For VS Code, Cursor, Windsurf, Alacritty, and Zed, run `/terminal-setup` to install the binding. +Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. For VS Code, Cursor, Windsurf, Alacritty, and Zed, run `/terminal-setup` to install the binding. ### @@ -277,7 +277,7 @@ 1. **Start search** : press `Ctrl+R` to activate reverse history search 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results 3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches - 4. **Change scope** : press `Ctrl+S` to cycle between this session, this project, and all projects + 4. **Change scope** : search defaults to prompts from all projects. Press `Ctrl+S` to cycle the scope through this session, this project, and all projects 5. **Accept match** : * Press `Tab` or `Esc` to accept the current match and continue editing * Press `Enter` to accept and execute the command immediately
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -168,6 +168,7 @@ Command| Action ---|--- `h`/`j`/`k`/`l`| Move left/down/up/right +`Space`| Move right `w`| Next word `e`| End of word `b`| Previous word
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -30,7 +30,7 @@ `Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save -`Ctrl+L`| Clear prompt input and redraw screen| Clears typed text and forces a full terminal redraw. Conversation history is kept. Use this to recover if the display becomes garbled or partially blank +`Ctrl+L`| Redraw screen| Forces a full terminal redraw. Input and conversation history are kept. Use this to recover if the display becomes garbled or partially blank `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt @@ -276,10 +276,11 @@ 1. **Start search** : press `Ctrl+R` to activate reverse history search 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results 3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches - 4. **Accept match** : + 4. **Change scope** : press `Ctrl+S` to cycle between this session, this project, and all projects + 5. **Accept match** : * Press `Tab` or `Esc` to accept the current match and continue editing * Press `Enter` to accept and execute the command immediately - 5. **Cancel search** : + 6. **Cancel search** : * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -1,3 +1,9 @@ +> ## Documentation Index +> +> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt> +> +> Use this file to discover all available pages before exploring further. + ## ​
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -91,7 +91,7 @@ Shortcut| Description| Notes ---|---|--- `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) -`!` at start| Bash mode| Run commands directly and add execution output to the session +`!` at start| Shell mode| Run commands directly and add execution output to the session `@`| File path mention| Trigger file path autocomplete ### @@ -317,15 +317,15 @@ ​ -Bash mode with `!` prefix - -Run bash commands directly without going through Claude by prefixing your input with `!`: +Shell mode with `!` prefix + +Run shell commands directly without going through Claude by prefixing your input with `!`: ! npm test ! git status ! ls -la -Bash mode: +Shell mode: * Adds the command and its output to the conversation context * Shows real-time progress and output @@ -333,7 +333,7 @@ * Does not require Claude to interpret or approve the command * Supports history-based autocomplete: type a partial command and press **Tab** to complete from previous `!` commands in the current project * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt - * Pasting text that starts with `!` into an empty prompt enters bash mode automatically, matching typed `!` behavior + * Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior This is useful for quick shell operations while maintaining conversation context.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -143,13 +143,15 @@ Command| Action| From mode ---|---|--- -`Esc`| Enter NORMAL mode| INSERT +`Esc`| Enter NORMAL mode| INSERT, VISUAL `i`| Insert before cursor| NORMAL `I`| Insert at beginning of line| NORMAL `a`| Insert after cursor| NORMAL `A`| Insert at end of line| NORMAL `o`| Open line below| NORMAL `O`| Open line above| NORMAL +`v`| Start character-wise visual selection| NORMAL +`V`| Start line-wise visual selection| NORMAL ### @@ -220,6 +222,30 @@ `i[`/`a[`| Inner/around brackets `i{`/`a{`| Inner/around braces +### + +​ + +Visual mode + +Press `v` for character-wise selection or `V` for line-wise selection. Motions extend the selection, and operators act on it directly. + +Command| Action +---|--- +`d`/`x`| Delete selection +`y`| Yank selection +`c`/`s`| Change selection +`p`| Replace selection with register contents +`r{char}`| Replace every selected character with `{char}` +`~`/`u`/`U`| Toggle, lowercase, or uppercase selection +`>`/`<`| Indent or dedent selected lines +`J`| Join selected lines +`o`| Swap cursor and anchor +`iw`/`aw`/`i"`/…| Select a text object +`v`/`V`| Toggle between character-wise and line-wise, or exit + +Block-wise visual mode with `Ctrl+V` is not supported. + ## ​
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -117,7 +117,7 @@ Shortcut| Description| Notes ---|---|--- -Hold `Space`| Push-to-talk dictation| Requires [voice dictation](</docs/en/voice-dictation>) to be enabled. Transcript inserts at cursor. [Rebindable](</docs/en/voice-dictation#rebind-the-push-to-talk-key>) +Hold or tap `Space`| Voice dictation| Requires [voice dictation](</docs/en/voice-dictation>) to be enabled. Hold to record, or run `/voice tap` for tap-to-toggle. [Rebindable](</docs/en/voice-dictation#rebind-the-dictation-key>) ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -353,7 +353,7 @@ When working on complex, multi-step work, Claude creates a task list to track progress. Tasks appear in the status area of your terminal with indicators showing what’s pending, in progress, or complete. - * Press `Ctrl+T` to toggle the task list view. The display shows up to 10 tasks at a time + * Press `Ctrl+T` to toggle the task list view. The display shows up to 5 tasks at a time * To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks” * Tasks persist across context compactions, helping Claude stay organized on larger projects * To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude` @@ -364,7 +364,7 @@ Session recap -When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. To override the `/config` toggle, set [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>) to `0` or `1`. The recap is always skipped in non-interactive mode. +When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode. ##
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -6,8 +6,8 @@ Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`, `Alt+T`) require configuring Option as Meta in your terminal: - * **iTerm2** : settings → Profiles → Keys → set Left/Right Option key to “Esc+” - * **Terminal.app** : settings → Profiles → Keyboard → check “Use Option as Meta Key” + * **iTerm2** : Settings → Profiles → Keys → General → set Left/Right Option key to “Esc+” + * **Apple Terminal** : Settings → Profiles → Keyboard → check “Use Option as Meta Key” * **VS Code** : set `"terminal.integrated.macOptionIsMeta": true` in VS Code settings See [Terminal configuration](</docs/en/terminal-config>) for details. @@ -75,12 +75,12 @@ Method| Shortcut| Context ---|---|--- Quick escape| `\` \+ `Enter`| Works in all terminals -macOS default| `Option+Enter`| Default on macOS -Shift+Enter| `Shift+Enter`| Works out of the box in iTerm2, WezTerm, Ghostty, Kitty -Control sequence| `Ctrl+J`| Line feed character for multiline +Option key| `Option+Enter`| After enabling [Option as Meta](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) on macOS +Shift+Enter| `Shift+Enter`| Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal +Control sequence| `Ctrl+J`| Works in any terminal without configuration Paste mode| Paste directly| For code blocks, logs -Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, and Kitty. For other terminals (VS Code, Alacritty, Zed, Warp), run `/terminal-setup` to install the binding. +Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, and Apple Terminal. For VS Code, Cursor, Windsurf, Alacritty, and Zed, run `/terminal-setup` to install the binding. ### @@ -199,6 +199,7 @@ `>>`| Indent line `<<`| Dedent line `J`| Join lines +`u`| Undo `.`| Repeat last change ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -31,7 +31,7 @@ `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus -`Up/Down arrows`| Navigate command history| Recall previous inputs +`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history `Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt @@ -46,9 +46,12 @@ Shortcut| Description| Context ---|---|--- +`Ctrl+A`| Move cursor to start of current line| In multiline input, moves to the start of the current logical line +`Ctrl+E`| Move cursor to end of current line| In multiline input, moves to the end of the current logical line `Ctrl+K`| Delete to end of line| Stores deleted text for pasting -`Ctrl+U`| Clear entire input buffer| Stores cleared text for pasting with `Ctrl+Y`. `Cmd+Backspace` deletes from cursor to line start -`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K` or `Ctrl+U` +`Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut +`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On Windows, `Ctrl+Backspace` also deletes the previous word +`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS `Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -23,9 +23,9 @@ `Ctrl+C`| Cancel current input or generation| Standard interrupt `Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control `Ctrl+D`| Exit Claude Code session| EOF signal -`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding -`Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history -`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) +`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save +`Ctrl+L`| Clear prompt input and redraw screen| Clears typed text and forces a full terminal redraw. Conversation history is kept. Use this to recover if the display becomes garbled or partially blank +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice @@ -47,7 +47,7 @@ Shortcut| Description| Context ---|---|--- `Ctrl+K`| Delete to end of line| Stores deleted text for pasting -`Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input +`Ctrl+U`| Clear entire input buffer| Stores cleared text for pasting with `Ctrl+Y`. `Cmd+Backspace` deletes from cursor to line start `Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K` or `Ctrl+U` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS @@ -102,6 +102,8 @@ Shortcut| Description ---|--- `Ctrl+E`| Toggle show all content +`[`| Write the full conversation to your terminal’s native scrollback so `Cmd+F`, tmux copy mode, and other native tools can search it. Requires [fullscreen rendering](</docs/en/fullscreen#search-and-review-the-conversation>) +`v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>) `q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>) ### @@ -356,6 +358,14 @@ ​ +Session recap + +When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. To override the `/config` toggle, set [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>) to `0` or `1`. The recap is always skipped in non-interactive mode. + +## + +​ + PR review status When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer (for example, “PR #446”). The link has a colored underline indicating the review state:
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -25,7 +25,7 @@ `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding `Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history -`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -87,7 +87,7 @@ Shortcut| Description| Notes ---|---|--- -`/` at start| Command or skill| See built-in commands and [skills](</docs/en/skills>) +`/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Bash mode| Run commands directly and add execution output to the session `@`| File path mention| Trigger file path autocomplete @@ -118,9 +118,9 @@ ​ -Built-in commands - -Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows both built-in commands and [bundled skills](</docs/en/skills#bundled-skills>) like `/simplify`. Not all commands are visible to every user since some depend on your platform or plan. See the [commands reference](</docs/en/commands>) for the full list of built-in commands. To create your own commands, see [skills](</docs/en/skills>). +Commands + +Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows everything you can invoke: built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code. ## @@ -170,7 +170,7 @@ `;`| Repeat last f/F/t/T motion `,`| Repeat last f/F/t/T motion in reverse -In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, the arrow keys navigate command history instead. +In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, `j`/`k` and the arrow keys navigate command history instead. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -25,7 +25,7 @@ `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding `Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history -`Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default +`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response) `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -24,7 +24,7 @@ `Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding -`Ctrl+L`| Redraw the screen| Repaints the current UI without clearing conversation history +`Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history `Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -128,7 +128,7 @@ Vim editor mode -Enable vim-style editing with `/vim` command or configure permanently via `/config`. +Enable vim-style editing via `/config` → Editor mode. ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -4,11 +4,11 @@ Keyboard shortcuts -Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: +Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`, `Alt+T`) require configuring Option as Meta in your terminal: * **iTerm2** : settings → Profiles → Keys → set Left/Right Option key to “Esc+” * **Terminal.app** : settings → Profiles → Keyboard → check “Use Option as Meta Key” - * **VS Code** : settings → Profiles → Keys → set Left/Right Option key to “Esc+” + * **VS Code** : set `"terminal.integrated.macOptionIsMeta": true` in VS Code settings See [Terminal configuration](</docs/en/terminal-config>) for details. @@ -24,7 +24,7 @@ `Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control `Ctrl+D`| Exit Claude Code session| EOF signal `Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding -`Ctrl+L`| Clear terminal screen| Keeps conversation history +`Ctrl+L`| Redraw the screen| Repaints the current UI without clearing conversation history `Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt @@ -35,7 +35,7 @@ `Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. On macOS, configure your terminal to send Option as Meta for this shortcut to work `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ### @@ -102,7 +102,7 @@ Shortcut| Description ---|--- `Ctrl+E`| Toggle show all content -`q`, `Ctrl+C`, `Esc`| Exit transcript view. `Ctrl+C` and `Esc` can be rebound via [`transcript:exit`](</docs/en/keybindings>); `q` is not rebindable +`q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>) ###
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -301,6 +301,7 @@ * Does not require Claude to interpret or approve the command * Supports history-based autocomplete: type a partial command and press **Tab** to complete from previous `!` commands in the current project * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt + * Pasting text that starts with `!` into an empty prompt enters bash mode automatically, matching typed `!` behavior This is useful for quick shell operations while maintaining conversation context.
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -312,7 +312,7 @@ When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. - * Press **Tab** to accept the suggestion, or press **Enter** to accept and submit + * Press **Tab** or **Right arrow** to accept the suggestion, or press **Enter** to accept and submit * Start typing to dismiss it The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`:
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -63,8 +63,6 @@ ---|---|--- `Ctrl+T`| Toggle syntax highlighting for code blocks| Only works inside the `/theme` picker menu. Controls whether code in Claude’s responses uses syntax coloring -Syntax highlighting is only available in the native build of Claude Code. - ### ​
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -47,7 +47,7 @@ Shortcut| Description| Context ---|---|--- `Ctrl+K`| Delete to end of line| Stores deleted text for pasting -`Ctrl+U`| Delete entire line| Stores deleted text for pasting +`Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input `Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K` or `Ctrl+U` `Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS `Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS @@ -291,12 +291,6 @@ Run bash commands directly without going through Claude by prefixing your input with `!`: -Report incorrect code - -Copy - -Ask AI - ! npm test ! git status ! ls -la @@ -325,12 +319,6 @@ The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: -Report incorrect code - -Copy - -Ask AI - export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false ## @@ -340,12 +328,6 @@ Side questions with /btw Use `/btw` to ask a quick question about your current work without adding to the conversation history. This is useful when you want a fast answer but don’t want to clutter the main context or derail Claude from a long-running task. - -Report incorrect code - -Copy - -Ask AI /btw what was the name of that config file again?
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -21,13 +21,13 @@ Shortcut| Description| Context ---|---|--- `Ctrl+C`| Cancel current input or generation| Standard interrupt -`Ctrl+F`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control +`Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control `Ctrl+D`| Exit Claude Code session| EOF signal -`Ctrl+G`| Open in default text editor| Edit your prompt or custom response in your default text editor +`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding `Ctrl+L`| Clear terminal screen| Keeps conversation history `Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default `Ctrl+R`| Reverse search command history| Search through previous commands interactively -`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Pastes an image or path to an image file +`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt `Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice `Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus @@ -36,6 +36,7 @@ `Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut +`Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ### @@ -91,6 +92,19 @@ `/` at start| Command or skill| See built-in commands and [skills](</docs/en/skills>) `!` at start| Bash mode| Run commands directly and add execution output to the session `@`| File path mention| Trigger file path autocomplete + +### + +​ + +Transcript viewer + +When the transcript viewer is open (toggled with `Ctrl+O`), these shortcuts are available. `Ctrl+E` can be rebound via [`transcript:toggleShowAll`](</docs/en/keybindings>). + +Shortcut| Description +---|--- +`Ctrl+E`| Toggle show all content +`q`, `Ctrl+C`, `Esc`| Exit transcript view. `Ctrl+C` and `Esc` can be rebound via [`transcript:exit`](</docs/en/keybindings>); `q` is not rebindable ### @@ -256,7 +270,7 @@ **Key features:** - * Output is buffered and Claude can retrieve it using the TaskOutput tool + * Output is written to a file and Claude can retrieve it using the Read tool * Background tasks have unique IDs for tracking and output retrieval * Background tasks are automatically cleaned up when Claude Code exits * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why
modified
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -33,7 +33,7 @@ `Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus `Up/Down arrows`| Navigate command history| Recall previous inputs `Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message -`Shift+Tab` or `Alt+M` (some configurations)| Toggle permission modes| Switch between Auto-Accept Mode, Plan Mode, and normal mode. +`Shift+Tab` or `Alt+M` (some configurations)| Cycle permission modes| Cycle through `default`, `acceptEdits`, `plan`, and any modes you have enabled, such as `auto` or `bypassPermissions`. See [permission modes](</docs/en/permission-modes>). `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut
added
Show diff (391 lines)
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -0,0 +1,388 @@ +## + +​ + +Keyboard shortcuts + +Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal: + + * **iTerm2** : settings → Profiles → Keys → set Left/Right Option key to “Esc+” + * **Terminal.app** : settings → Profiles → Keyboard → check “Use Option as Meta Key” + * **VS Code** : settings → Profiles → Keys → set Left/Right Option key to “Esc+” + +See [Terminal configuration](</docs/en/terminal-config>) for details. + +### + +​ + +General controls + +Shortcut| Description| Context +---|---|--- +`Ctrl+C`| Cancel current input or generation| Standard interrupt +`Ctrl+F`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control +`Ctrl+D`| Exit Claude Code session| EOF signal +`Ctrl+G`| Open in default text editor| Edit your prompt or custom response in your default text editor +`Ctrl+L`| Clear terminal screen| Keeps conversation history +`Ctrl+O`| Toggle verbose output| Shows detailed tool usage and execution. Also expands MCP read and search calls, which collapse to a single line like “Queried slack” by default +`Ctrl+R`| Reverse search command history| Search through previous commands interactively +`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Pastes an image or path to an image file +`Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice +`Ctrl+T`| Toggle task list| Show or hide the task list in the terminal status area +`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus +`Up/Down arrows`| Navigate command history| Recall previous inputs +`Esc` \+ `Esc`| Rewind or summarize| Restore code and/or conversation to a previous point, or summarize from a selected message +`Shift+Tab` or `Alt+M` (some configurations)| Toggle permission modes| Switch between Auto-Accept Mode, Plan Mode, and normal mode. +`Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut + +### + +​ + +Text editing + +Shortcut| Description| Context +---|---|--- +`Ctrl+K`| Delete to end of line| Stores deleted text for pasting +`Ctrl+U`| Delete entire line| Stores deleted text for pasting +`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K` or `Ctrl+U` +`Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS +`Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS +`Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS + +### + +​ + +Theme and display + +Shortcut| Description| Context +---|---|--- +`Ctrl+T`| Toggle syntax highlighting for code blocks| Only works inside the `/theme` picker menu. Controls whether code in Claude’s responses uses syntax coloring + +Syntax highlighting is only available in the native build of Claude Code. + +### + +​ + +Multiline input + +Method| Shortcut| Context +---|---|--- +Quick escape| `\` \+ `Enter`| Works in all terminals +macOS default| `Option+Enter`| Default on macOS +Shift+Enter| `Shift+Enter`| Works out of the box in iTerm2, WezTerm, Ghostty, Kitty +Control sequence| `Ctrl+J`| Line feed character for multiline +Paste mode| Paste directly| For code blocks, logs + +Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, and Kitty. For other terminals (VS Code, Alacritty, Zed, Warp), run `/terminal-setup` to install the binding. + +### + +​ + +Quick commands + +Shortcut| Description| Notes +---|---|--- +`/` at start| Command or skill| See built-in commands and [skills](</docs/en/skills>) +`!` at start| Bash mode| Run commands directly and add execution output to the session +`@`| File path mention| Trigger file path autocomplete + +### + +​ + +Voice input + +Shortcut| Description| Notes +---|---|--- +Hold `Space`| Push-to-talk dictation| Requires [voice dictation](</docs/en/voice-dictation>) to be enabled. Transcript inserts at cursor. [Rebindable](</docs/en/voice-dictation#rebind-the-push-to-talk-key>) + +## + +​ + +Built-in commands + +Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows both built-in commands and [bundled skills](</docs/en/skills#bundled-skills>) like `/simplify`. Not all commands are visible to every user since some depend on your platform or plan. See the [commands reference](</docs/en/commands>) for the full list of built-in commands. To create your own commands, see [skills](</docs/en/skills>). + +## + +​ + +Vim editor mode + +Enable vim-style editing with `/vim` command or configure permanently via `/config`. + +### + +​ + +Mode switching + +Command| Action| From mode +---|---|--- +`Esc`| Enter NORMAL mode| INSERT +`i`| Insert before cursor| NORMAL +`I`| Insert at beginning of line| NORMAL +`a`| Insert after cursor| NORMAL +`A`| Insert at end of line| NORMAL +`o`| Open line below| NORMAL +`O`| Open line above| NORMAL + +### + +​ + +Navigation (NORMAL mode) + +Command| Action +---|--- +`h`/`j`/`k`/`l`| Move left/down/up/right +`w`| Next word +`e`| End of word +`b`| Previous word +`0`| Beginning of line +`$`| End of line +`^`| First non-blank character +`gg`| Beginning of input +`G`| End of input +`f{char}`| Jump to next occurrence of character +`F{char}`| Jump to previous occurrence of character +`t{char}`| Jump to just before next occurrence of character +`T{char}`| Jump to just after previous occurrence of character +`;`| Repeat last f/F/t/T motion +`,`| Repeat last f/F/t/T motion in reverse + +In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, the arrow keys navigate command history instead. + +### + +​ + +Editing (NORMAL mode) + +Command| Action +---|--- +`x`| Delete character +`dd`| Delete line +`D`| Delete to end of line +`dw`/`de`/`db`| Delete word/to end/back +`cc`| Change line +`C`| Change to end of line +`cw`/`ce`/`cb`| Change word/to end/back +`yy`/`Y`| Yank (copy) line +`yw`/`ye`/`yb`| Yank word/to end/back +`p`| Paste after cursor +`P`| Paste before cursor +`>>`| Indent line +`<<`| Dedent line +`J`| Join lines +`.`| Repeat last change + +### + +​ + +Text objects (NORMAL mode) + +Text objects work with operators like `d`, `c`, and `y`: + +Command| Action +---|--- +`iw`/`aw`| Inner/around word +`iW`/`aW`| Inner/around WORD (whitespace-delimited) +`i"`/`a"`| Inner/around double quotes +`i'`/`a'`| Inner/around single quotes +`i(`/`a(`| Inner/around parentheses +`i[`/`a[`| Inner/around brackets +`i{`/`a{`| Inner/around braces + +## + +​ + +Command history + +Claude Code maintains command history for the current session: + + * Input history is stored per working directory + * Input history resets when you run `/clear` to start a new session. The previous session’s conversation is preserved and can be resumed. + * Use Up/Down arrows to navigate (see keyboard shortcuts above) + * **Note** : history expansion (`!`) is disabled by default + +### + +​ + +Reverse search with Ctrl+R + +Press `Ctrl+R` to interactively search through your command history: + + 1. **Start search** : press `Ctrl+R` to activate reverse history search + 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results + 3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches + 4. **Accept match** : + * Press `Tab` or `Esc` to accept the current match and continue editing + * Press `Enter` to accept and execute the command immediately + 5. **Cancel search** : + * Press `Ctrl+C` to cancel and restore your original input + * Press `Backspace` on empty search to cancel + +The search displays matching commands with the search term highlighted, so you can find and reuse previous inputs. + +## + +​ + +Background bash commands + +Claude Code supports running bash commands in the background, allowing you to continue working while long-running processes execute. + +### + +​ + +How backgrounding works + +When Claude Code runs a command in the background, it runs the command asynchronously and immediately returns a background task ID. Claude Code can respond to new prompts while the command continues executing in the background. To run commands in the background, you can either: + + * Prompt Claude Code to run a command in the background + * Press Ctrl+B to move a regular Bash tool invocation to the background. (Tmux users must press Ctrl+B twice due to tmux’s prefix key.) + +**Key features:** + + * Output is buffered and Claude can retrieve it using the TaskOutput tool + * Background tasks have unique IDs for tracking and output retrieval + * Background tasks are automatically cleaned up when Claude Code exits + * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why + +To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:** + + * Build tools (webpack, vite, make) + * Package managers (npm, yarn, pnpm) + * Test runners (jest, pytest) + * Development servers + * Long-running processes (docker, terraform) + +### + +​ + +Bash mode with `!` prefix + +Run bash commands directly without going through Claude by prefixing your input with `!`: + +Report incorrect code + +Copy + +Ask AI + + ! npm test + ! git status + ! ls -la + +Bash mode: + + * Adds the command and its output to the conversation context + * Shows real-time progress and output + * Supports the same `Ctrl+B` backgrounding for long-running commands + * Does not require Claude to interpret or approve the command + * Supports history-based autocomplete: type a partial command and press **Tab** to complete from previous `!` commands in the current project + * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt + +This is useful for quick shell operations while maintaining conversation context. + +## + +​ + +Prompt suggestions + +When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project’s git history, so it reflects files you’ve been working on recently. After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow. + + * Press **Tab** to accept the suggestion, or press **Enter** to accept and submit + * Start typing to dismiss it + +The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: + +Report incorrect code + +Copy + +Ask AI + + export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false + +## + +​ + +Side questions with /btw + +Use `/btw` to ask a quick question about your current work without adding to the conversation history. This is useful when you want a fast answer but don’t want to clutter the main context or derail Claude from a long-running task. + +Report incorrect code + +Copy + +Ask AI + + /btw what was the name of that config file again? + +Side questions have full visibility into the current conversation, so you can ask about code Claude has already read, decisions it made earlier, or anything else from the session. The question and answer are ephemeral: they appear in a dismissible overlay and never enter the conversation history. + + * **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and does not interrupt the main turn. + * **No tool access** : side questions answer only from what is already in context. Claude cannot read files, run commands, or search when answering a side question. + * **Single response** : there are no follow-up turns. If you need a back-and-forth, use a normal prompt instead. + * **Low cost** : the side question reuses the parent conversation’s prompt cache, so the additional cost is minimal. + +Press **Space** , **Enter** , or **Escape** to dismiss the answer and return to the prompt. `/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools, while a subagent has full tools but starts with an empty context. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new. + +## + +​ + +Task list + +When working on complex, multi-step work, Claude creates a task list to track progress. Tasks appear in the status area of your terminal with indicators showing what’s pending, in progress, or complete. + + * Press `Ctrl+T` to toggle the task list view. The display shows up to 10 tasks at a time + * To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks” + * Tasks persist across context compactions, helping Claude stay organized on larger projects + * To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude` + +## + +​ + +PR review status + +When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer (for example, “PR #446”). The link has a colored underline indicating the review state: + + * Green: approved + * Yellow: pending review + * Red: changes requested + * Gray: draft + * Purple: merged + +`Cmd+click` (Mac) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status updates automatically every 60 seconds. + +PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`). + +## + +​ + +See also + + * [Skills](</docs/en/skills>) \- Custom prompts and workflows + * [Checkpointing](</docs/en/checkpointing>) \- Rewind Claude’s edits and restore previous states + * [CLI reference](</docs/en/cli-reference>) \- Command-line flags and options + * [Settings](</docs/en/settings>) \- Configuration options + * [Memory management](</docs/en/memory>) \- Managing CLAUDE.md files