Checkpoints and Control Keys
Level 1 · Starting out
How to stop Claude, undo its edits and leave a session. What a checkpoint saves, and the keys that stop, rewind, exit and redraw.
Course contentsLesson 3 of 16
Level 1 · Starting out
Level 2 · Asking before it acts
Level 3 · Telling it how you work
Level 4 · The tools it uses
Level 5 · Growing past one chat
After this lesson you can
- Stop Claude without losing its work
- Rewind code and chat to an earlier prompt
- Know which keys exit and which only clear
10 mincovers 11 glossary entries
Worth reading first: Claude Code Sessions
How to stop, undo and leave
Esc stops Claude in the middle of its work, and it keeps what it has done so far. Each prompt you send makes a checkpoint, a copy of the files from before that step. Press Esc twice on an empty prompt, or run /rewind, to go back. Claude Code keeps the 100 most recent checkpoints in a session.
The rewind menu lists your past prompts. Pick one, and you can restore the code, the chat, or both. You can also sum up the chat from that point to free room. Checkpoints are saved with the session, so a session you resume tomorrow can still rewind.
A checkpoint only tracks files that Claude changed with its own edit tools. A file that only a shell command changed, such as a script that rewrote a config, is not tracked. Neither is a change you made by hand in another window. So a checkpoint is a quick undo, not a backup. Keep using git for that.
Ctrl+C also stops a running step. When nothing is running, the first press clears what you typed and a second press quits. Ctrl+D quits too, but only after a second press within 800 milliseconds. If you clear a draft by mistake, the up arrow brings it back.
Some work can keep going while you chat. Ctrl+B sends a running command or agent to the background. Inside tmux, press it twice, since tmux uses that key itself. Ctrl+X Ctrl+K stops every helper running in the background. You press it twice within 3 seconds to confirm.
A message you send while Claude works waits in a queue until Claude reaches a stopping point. Ctrl+Enter sends the queue right now, with your draft after it. In a terminal that does not pass that key through, Ctrl+X Ctrl+S does the same job.
Three keys change what you see, not what Claude does. Ctrl+O opens the transcript view, with every tool call in full. Ctrl+T shows or hides Claude's to-do checklist for the task. Ctrl+L redraws the screen when it looks broken, and keeps your chat and your draft as they were.
The control keys at a glance
| Key | What it does | Careful |
|---|---|---|
| Esc | Stops Claude mid-step, keeps the work so far | Closes a dialog instead, when one is open |
| Esc Esc | Opens the rewind menu on an empty prompt | Clears your draft first if there is text |
| Ctrl+C | Stops a running step, or clears the draft | A second press on an empty prompt quits |
| Ctrl+D | Quits after a second press within 800 ms | Deletes a letter instead when there is text |
| Ctrl+B | Sends a running command or agent to the background | Press it twice inside tmux |
| Ctrl+O | Opens the full transcript view | q, Esc or Ctrl+C goes back |
Worked example
Lucy rewinds a bad refactor
Lucy asks Claude to split one big file into four. Ten minutes later the tests fail in 12 places, and she does not like the new layout anyway.
She presses Esc twice, picks the prompt from before the split and chooses to restore code and chat. The big file is back, and she asks for a smaller change.
The words for this lesson11
Check yourself
A shell command, not Claude's edit tool, rewrote a file that Claude never touched. What does rewind do to that file?
Finished this lesson?
Marking it complete also marks its 11 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.