Halfway through a long prompt you remember a quick question that has nothing to do with it.
Press Ctrl+S with text in the input and Claude Code stashes it and clears the prompt. Type your other message, send it, then press Ctrl+S on the empty prompt. The stashed text comes back with the cursor position, pasted content and input mode.
If you stashed a ! shell command, it returns in shell mode, not as a plain prompt.
It is the same idea as stashing in git, only for sentences. I would use it instead of copying a half-written prompt into a notes app and losing it.
The alternative is to send the unfinished prompt, which wastes a turn, or to throw it away and retype it. Neither is great for a prompt with pasted logs or an image in it, and the stash keeps both. It also keeps the draft out of the way while you type something short, so a quick question does not need a second terminal.
Two things. It is a single slot, so stash, restore, then stash again. And some terminals swallow Ctrl+S themselves, so if nothing happens, that is the first thing I would check.
Further reading: Interactive mode – Claude Code docs, On this site: Ctrl+R searches every prompt you ever sent to Claude Code, On this site: Shift+Tab cycles permission modes, and acceptEdits skips the file-edit prompts