← Claude Code Hub
✦ Tip #182 Aug 31, 2026

Ctrl+S in Claude Code: git stash for your half-written prompt

You are halfway through a request and need to ask something else first. One key parks it, and you don't even have to remember to bring it back.

Diagram: Ctrl+S parks your prompt draft in Claude Code and hands it back on the next submit

TL;DR Ctrl+S parks the prompt you are writing and clears the box. Send the next one and it comes back on its own with a Draft restored notice. It is git stash for the input box, with two differences: there is a single slot, and you never have to pop it.

You are twenty lines into a prompt, remember a small question, and need to ask it first. The normal move is to wipe what you have, ask, and rewrite it from memory.

Ctrl+S exists for that. It takes the whole draft away, leaves you an empty box, and hands it back afterwards. The shape is git stash: you put aside what you are holding, the desk goes clean, you do something else, you pick it back up.

Result:

> review the login and check that the refresh token▮     ← half-written

Ctrl+S

>                                                        ← clean box
> which file holds the auth middleware?

Enter

  Draft restored                                         ← 5-second notice
> review the login and check that the refresh token▮     ← already back

How it works

It is a one-slot toggle, and what it does depends on whether the box has text in it.

1. With text, it parks. Ctrl+S stores the draft and clears the box. Not just the characters: it carries the cursor position and the pasted content too, so images you pasted come back with it.

2. With an empty box, it returns. Press Ctrl+S again and the draft is exactly where you left it, cursor included.

3. Or you never return it yourself. This is the part the docs leave out. Submit a normal prompt with something parked and the draft reappears the moment you hit Enter, while Claude is still answering, with a Draft restored notice that lasts five seconds. Under the hood it takes the place of the usual "clear the box" step: instead of going empty, the box fills with what you parked.

4. Slash commands take a different route. Submitting something that starts with / does not trigger the return right then. The command does it when it finishes, and only if the box is still empty. If you started typing something else in the meantime, the draft stays parked and you bring it back yourself with Ctrl+S.

Where the analogy breaks

git stash and this one share a shape, not a rulebook. Both differences matter:

git stash Ctrl+S
How much it holds A stack, as many entries as you like One slot
Stashing with something already stashed Pushes a new entry Overwrites it, no warning
Getting it back By hand, with git stash pop Comes back on its own on your next prompt
How long it lasts Until you pop it, across restarts As long as the session

The first one is the one that bites. Park a draft, write another, press Ctrl+S again and the first is gone. There is no stash list and no way back to it.

And there is a hint that nudges you at the right moment

The ctrl + s to stash prompt line in the prompt help (the one ? opens) is always there, listed alongside every other shortcut. But another one is not: a one-time Tip: ctrl+s to stash that fires when Claude Code sees your draft shrink sharply, from twenty characters or more down to five or fewer without going all the way to empty. Which is to say, right after you wipe something long. It stops appearing once you use the shortcut, because that gets recorded as hasUsedStash in your settings.json.

Details that save you a scare

  • If the screen freezes when you press Ctrl+S, your terminal is reading it as flow control (XOFF). Ctrl+Q unfreezes it, and stty -ixon turns that off for good.
  • Ctrl+S means something else inside Ctrl+R search. There it cycles the scope through this session, this project, and all projects. That one is Ctrl+R: bring back any prompt you've already written.
  • Do not mistake it for Esc Esc. With text in the box, the double press clears the draft and pushes it into history, so the up arrow gets it back but you lose your place. That lives in how to stop or redirect Claude Code mid-task.
  • It is not /rewind either. This only touches the input box. Undoing what Claude did to your files or your conversation is rewind with checkpoints, a different thing entirely.
  • And if what you want is to undo as you type, not to park, the key is Ctrl+_ (or Ctrl+Shift+-): it steps back through what you typed, up to fifty steps, and forgets everything the moment you submit.

Official docs: Interactive mode

Workshop for teams

Multiply your team's output without sacrificing quality: a 6 to 8 hour AI First workshop, online, on the Claude platform.

See the workshop
Free guide

The 51 essentials, as a PDF.

One page per tip. Five chapters. What I actually use daily in production — no theory, no fluff.

  • I. Getting started 10 tips
  • II. Awareness 3 tips
  • III. Mastery 22 tips
  • IV. Autonomy 10 tips
  • V. Comparison 6 tips
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 51
#

Wmedia · 51 Tips
Free guide · 51 tips · 5 chapters

The 51 essentials, as a PDF.

Are you a professional Web developer? · Unsubscribe anytime