Each one recovers a bit more of the session than the last. Start at the top and only go further down if you need to.
/btw Ask a side question. The question and the answer never enter your conversation.Ctrl+S Stash the half-written prompt you are about to lose. Press it again to bring it back./recap One line telling you what this session has actually been doing. For when you walk back in cold.Esc Esc The rewind menu. Roll code, conversation, or both back to any earlier message./branch Try a different direction in a copy, with the original conversation still waiting for you.You are twenty turns into something and you need to check one small thing. Normally you type it into the chat, Claude answers, and now that detour is permanently part of the conversation Claude carries forward. /btw fixes exactly that.
/btw what was that config file called again? The answer appears in a dismissible overlay above the terminal, and the question and answer never enter the conversation history./btw while Claude is still writing. The side question runs independently and does not interrupt the main turn.c copies the answer as raw Markdown, x clears the earlier exchanges, f forks the question into a background subagent with full tool access, and Esc dismisses it./btw is for "what did we decide earlier", not "go look this up". If you need tools, press f in the overlay and it continues as a background subagent.You are four lines into a careful prompt and you realise you need to check something before you send it. Deleting it hurts. Ctrl+S puts it down and picks it back up.
Ctrl+S with text in the input. It stashes what you have typed and clears the prompt, so you have a clean box to work in.Ctrl+S again on an empty prompt. It restores the stashed text, your cursor position, and any pasted content, exactly as you left it./btw and the two become one move: stash the draft, ask the side question in the overlay, dismiss it, restore the draft. Your conversation ends up with no evidence that the detour ever happened.You stepped away for an hour. You come back to a wall of terminal output and no idea which of the four things you asked for is finished. Scrolling up is the slow way. /recap is the fast one.
/recap. Claude Code generates a one-line summary of the session so far, on demand. Both the automatic recap and /recap are capped at 400 characters, so it stays genuinely short./config and turn off Session recap. The /recap command still works.This is the one most people do not know exists, and it is the reason a bad turn stops being a lost afternoon. Claude Code captures the state of your code before each prompt you send that starts a turn, and keeps file snapshots for the 100 most recent checkpoints in a session.
Esc twice on an empty prompt. The rewind menu opens and lists every prompt you sent this session. Typing /rewind does the same thing, and so do its aliases /checkpoint and /undo.Esc clears the text instead of opening the menu. The cleared text goes into your input history, so press Up to get it back.Sometimes the session is not broken, you just want to try something else and you are not confident enough to throw away what you have. That is what branching is for.
/branch with a name. /branch new-design creates a branch of the conversation at this exact point and switches you into it./resume and pick it from the list./fork copies the conversation into a new background session and leaves you where you are. /subtask hands a side task to a forked subagent that keeps the full conversation and reports its result back into this chat.Rewinding restores your files and your conversation, but Claude can still be carrying a stale picture of what is on disk. Paste this as your first message after a restore and it re-grounds itself before touching anything.
We just rewound this session back to an earlier point, so ignore anything you attempted after that message, including any approach you were defending.
Before you edit anything, re-read the files you are about to change, because your memory of them is probably out of date now. Then tell me three things in three short bullets: what you believe the task is, what is genuinely already finished, and the single next change you plan to make. Wait for me to confirm before you edit a file.
A branch inherits the conversation, but you are the one who has to remember why you branched. Ask for the note first and your future self lands in the branch already oriented.
I am about to branch this conversation to try a different approach to [describe the problem in one line].
Before I do, write me a short handover note I can read once I am in the branch. Cover the goal in one sentence, the approach we have been taking and the specific reason it is not working, the files that matter and what each one is responsible for, and the two most promising alternatives worth trying instead. Keep it under 150 words, be blunt about what failed, and do not change any files while you write it.
rm, mv and cp, cannot be undone through rewind. This is the single most important thing on this page: keep committing your work.
The full Claude Code command reference
Side questions with /btw
Keyboard shortcuts, including Ctrl+S stash and restore
Session recap, automatic and on demand
Checkpointing, the rewind menu and its limitations
Branching a session