When Claude gets it wrong
Listen instead
When Claude gets it wrong
2:27 · spoken companion to this lesson
Claude will get things wrong. Not occasionally — regularly. It will misunderstand you, edit the wrong file, or confidently do something that is almost right.
This is the most useful lesson in the module, because the difference between people who get value out of Claude Code and people who give up is not prompting skill. It is knowing what to do in the next thirty seconds when the output is wrong.
Stop it mid-task
If Claude starts doing something you did not ask for, do not wait for it to finish.
Press Esc. It stops immediately.
You can then type what you actually meant. You do not need to start the whole session over, and you do not need to apologise to it.
Undo what it changed
Claude Code keeps a snapshot of your files before every message you send. To go back, make sure the input box is empty, then press Esc twice.
Does the same thing as pressing Esc twice, if you prefer typing it.
/rewindA menu appears listing every message you sent this session. Pick the point you want to return to, then choose:
| Option | What it does |
|---|---|
| Restore code and conversation | Undo the file changes and forget the discussion |
| Restore conversation | Forget the discussion, keep the files as they are |
| Restore code | Undo the file changes, keep the discussion |
| Never mind | Back out, change nothing |
Most of the time you want Restore code and conversation: it puts you back exactly where you were before the thing went wrong.
What rewind does not cover. It only tracks files Claude edited directly. If Claude ran a command that deleted, moved or copied a file, rewind cannot bring it back. It is a session-level undo, not a backup. Anthropic's own docs put it plainly: think of checkpoints as "local undo" and Git as "permanent history". You will learn Git in Module 5.
Say what is wrong, specifically
When the result is close but not right, resist the urge to type "no, fix it". That gives Claude nothing to work with, and you will go around the same loop three times.
Tell it what you observed:
the file was created but it's empty — I expected three bullet points in itCompare that to "that's wrong". The first one can be acted on. The second cannot.
When you are going in circles, start fresh
If you have corrected Claude twice and it is still not right, stop correcting. The conversation now contains all the wrong turns, and they are influencing every answer.
Wipes the conversation and starts a fresh one. Your files are untouched.
/clearThen ask once more, in one clear message, including what you learned from the failed attempts. This works far more often than a fourth correction.
Try it now
Ask for something, then deliberately change your mind.
write a poem about the sea in a file called poem.txtLet it finish. Now press Esc twice, choose Restore code and conversation, and pick the point before you asked. Run ls — poem.txt is gone.
You now have an undo button.
What you just learned
- Esc interrupts Claude mid-task.
- Esc Esc on an empty input, or
/rewind, opens the undo menu. - Rewind does not cover files changed by commands, only Claude's own edits.
- Describing what you observed beats saying "that's wrong".
- After two failed corrections,
/clearand ask once, cleanly.
Next: deciding what Claude is allowed to do without asking you first.
Next
What Claude is allowed to do