Claude Code command history: Up, Ctrl+R and the draft you cleared
The prompt you want is usually one you typed before, and Claude Code's history is deeper than the conversation in front of you: it reaches earlier sessions in the same project.
Two neighbours are worth telling apart. Resuming a session covers getting a whole conversation back, which is a different feature from recalling a single prompt. The fullscreen guide covers the renderer that changes how Ctrl+R looks. This page owns the history: where it comes from, what each key reaches, and how drafts come back.
Sources read November 25, 2026. By the Omniscio team. Updated .
Where the history comes from
Claude Code keeps a history of the prompts you type, and Up-arrow recall reaches prompts from past sessions of the same project. Three of the rules Anthropic documents decide what recall lists, and they are worth knowing before you conclude a prompt is missing.
- Anthropic's page says input history is stored per working directory, and that recall reaches prompts from past sessions of the same project.
- Running
/clearstarts a new session, and recall then lists the new session's prompts first, with earlier sessions' prompts after them. The previous conversation is preserved and can be resumed. - Submitting the same prompt twice in a row records one history entry, so pressing
Upsteps to the previous distinct prompt.
That last rule answers the most common complaint about recall, which is that a prompt seems to be missing. It was never lost: it did not become a separate entry.
A recalled prompt with a paste in it
When you recall a prompt that included pasted text, Claude Code sends the full pasted content again when you resubmit. If that content has since been cleaned up on disk, it does not send the literal [Pasted text #N] placeholder instead. The copy and paste guide covers what happens to a large paste in the first place.
History expansion with ! is disabled by default, so a prompt beginning with an exclamation mark is not rewritten by the shell-style expansion you may know from bash.
Searching with Ctrl+R
At the prompt, press Ctrl+R to interactively search through your command history. (The session picker uses the same key for a different job, renaming a row, which the resume guide covers.) What happens next depends on the renderer, and the two are different enough to be worth separating; run /tui with no argument if you are not sure which one a session uses.
Fullscreen rendering: a search dialog
Ctrl+Ropens a dialog. Type to filter, and pressUpandDownto move through the matches, with a preview pane showing the start of the highlighted one.Ctrl+Scycles the search scope through this session, this project, and all projects.EnterorTabplaces the match in the prompt input, andEsccancels.
Classic renderer: inline search
Ctrl+Ractivates reverse history search, and the current match appears in the prompt input as you type.- Pressing
Ctrl+Ragain cycles through older matches. - The inline search always searches prompts from all projects.
TaborEscaccepts the match and continues editing;Enteraccepts it and executes immediately.Ctrl+Ccancels and restores your original input, andBackspaceon an empty search cancels too.
The scope difference is the practical one. The inline search is fixed at all projects, so it finds a prompt from anywhere, while the fullscreen dialog carries its own scope and Ctrl+S changes it.
Finding a prompt by something you pasted
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. That needs Claude Code v2.1.314 or later.
Bringing back a cleared draft
Pressing Ctrl+C on a prompt you were writing clears it, and the draft is not lost. The route back depends on how much you have done since.
- Right after clearing: press
Uponce while the prompt is still empty. This needs v2.1.288 or later. - After sending a message or a command: press
Upto 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. This needs v2.1.292 or later.
Ten drafts across a whole session is a real limit, and it explains a draft that will not come back: on a long session it may have been pushed out by later ones. Nothing about it is stored past the process, so a session you resume in a new terminal starts with no cleared drafts.
Sources
Every line on this page rests on one of these. The date beside each one is the day we read it.
- Interactive mode, for the Command history section: per-directory storage, the
/clearordering, the repeated-prompt rule, recalled pastes and the!note; and for the cleared-draft section and the reverse-search steps in both renderers. Read November 25, 2026. - Fullscreen rendering, for the renderer itself and for
/tui. Read November 25, 2026.
Each version number on this page marks where a draft or search behaviour arrived. Read the section again before you trust a copy of this page from a few months back.
Common questions
How do I see my previous prompts in Claude Code?
Press Up. Input history is stored per working directory, and Up-arrow recall reaches prompts from past sessions of the same project; after a /clear, the new session's prompts come first, with earlier sessions after them.
How does Ctrl+R search work in Claude Code?
It searches your prompt history interactively. In the classic renderer it searches prompts from all projects; in fullscreen rendering it opens a search dialog where Ctrl+S cycles the scope between this session, this project and all projects.
Why does Up skip one of my prompts?
Because submitting the same prompt twice in a row records one history entry, so pressing Up steps to the previous distinct prompt rather than the previous submission.
How do I get back a prompt I cleared with Ctrl+C?
Press Up while the prompt is still empty, or later 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.
Is bang history expansion available in Claude Code?
No. History expansion with an exclamation mark is disabled by default.
Every session, one window
Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.