Module 01 · 20 min

Let it change something

Hand Claude Code a small task, answer the permission prompt, read the diff it made, and put the file back with /rewind.

Asking questions is safe and you already know it works. The hesitation starts at the next step, where you tell it to change a file and it does. Most people hover there for a while, approving nothing, reading everything twice.

The thing that ends the hovering is knowing how to undo. Claude Code keeps a snapshot of your files before each thing you ask for, and one command puts them back. This module is about doing that on purpose, once, so it stops being theoretical.

Do this

  1. Start in a project with a clean git history. Before you begin, check there is nothing uncommitted:

    git status

    You want to see nothing to commit, working tree clean. If you have work in progress, commit it or stash it first. You are about to let something else edit this folder, and a clean starting point is what makes the change readable afterwards.

  2. Start Claude Code and give it one small, concrete task. Small means one file. Concrete means you could tell whether it did it:

    Add a docstring to the top of src/utils.py saying what the file is for.

    Name a real file in your project. A vague task (“clean up the code”) produces a change you cannot check, which defeats the whole exercise.

  3. Read the permission prompt before you answer it. It appears because Claude wants to edit a file, and editing is not allowed without your say-so in the mode you are in. The prompt names the file and shows you what it wants to write. Read the file path first. It is the part people skip and it is the part that matters.

  4. Say yes to this one. Approve the edit. There will also be an option to approve and stop being asked. Do not take it yet; the whole point of today is seeing the prompt.

  5. Read the diff. A diff is a before-and-after view of a file, showing removed lines and added lines rather than the whole file. Claude prints one after the edit. Read it. Then open the fuller view:

    /diff

    That is an interactive viewer over the same information, showing both what git sees as changed and what changed on each turn of the conversation.

  6. Now undo it on purpose. Type:

    /rewind

    A menu opens. Choose Restore code, which puts the files back and leaves the conversation alone, so you can still see what was said. /undo and /checkpoint open the same menu, and so does pressing Escape twice on an empty prompt.

  7. Prove it actually went back. In a terminal:

    git status

    You want working tree clean again. Not “the menu said it restored”. The tree, from git, with your own eyes. A restore you did not verify is a restore you are guessing about.

You have now let it change something and taken the change back. That is the loop.

What just happened

The prompt. Every time Claude wants to do something the current permission mode does not already allow, it stops and asks. A permission mode is the setting for how much it does without checking with you first, and the one a new install starts in allows reading and nothing more. So a file edit stops. Answering yes lets that one call through, and the next one asks again.

Three things about that prompt are worth knowing on day one:

  • Escape declines it. So does answering no. Declining from the main conversation with no comment attached stops the turn entirely, which is what you want when the file path looks wrong.
  • Pressing Tab on the yes or no answer opens a comment box, so you can decline and say what to do instead in one action, rather than saying no and then typing a correction.
  • On a prompt for a shell command, Ctrl+E explains the command to you and labels it Low, Med, or High risk. That explanation costs a model call, which is why it only happens when you press the key.

The undo. Claude Code writes a checkpoint before each prompt you send, capturing the state of your files at that moment. It keeps the most recent 100 per session, and they are stored with the conversation, so they survive you closing the session and resuming it later. They are deleted along with the session after 30 days. /rewind is how you pick one.

The menu gives you six choices, and the split that matters is between code and conversation. Restore code and conversation rolls back both. Restore conversation rewinds what was said and leaves your files as they are. Restore code does the opposite, which is the one you used. There are also two summarize options that compress the conversation without touching files, and Never mind, which closes the menu.

Knowing the undo is there changes what you are willing to try. That is the actual return on this module. Someone who is confident they can get the file back will let it attempt a refactor they are unsure about, look at the result, and throw it away if it is wrong. Someone who is not confident approves nothing and types the code themselves, which is a slower version of what they were already doing.

Editing a file and running a command are not the same act

You will notice the second kind of prompt soon, and it behaves differently.

A file edit is bounded. Claude Code knows which file, which lines, and what the content will be, and it can put it back afterwards, because it made the change through its own editing tools and recorded what was there before.

A shell command is not bounded. npm install reaches the network. rm -rf build removes a directory. A command is a program that runs with your account’s access, and once it has run, nothing in Claude Code knows how to reverse it. So the checks around commands are heavier: reads like ls, cat, grep, and head are allowed without a prompt in every mode because they cannot change anything, a command chained with && or | is split apart and every piece has to be approved on its own merits, and a deletion aimed at something structural such as your home folder or the root of the filesystem is never approved automatically in any mode, whatever settings you have.

The same split shows up in what gets remembered. If you approve a command with the option that stops it asking again, a rule is written to a file in your project and it holds in later sessions. Approvals for file modifications are never written down; they last for that session and no longer.

When it goes sideways

You ask Claude to rename old_helper.py to helpers.py. It does the rename by running git mv, you approve the command, and then you decide you preferred the old name. You type /rewind, the menu opens, and Restore code is not in it. Only the conversation options are there.

Nothing is broken and nothing is refusing you. Checkpoints track changes made through Claude’s file-editing tools. A change made by a shell command is invisible to them, so the checkpoint for that turn has no file changes recorded against it, and the menu hides the two code options when there is nothing to restore.

The same blind spot covers a few other cases: files changed by another session or by you in your editor while Claude was working, and paths that are symlinks or hard links, which get skipped with a message reading Restored the code, but skipped N files.

The habit that fixes it is not a Claude Code setting. It is committing before you start something you might want to abandon. /rewind is the fast undo for edits within a session, and git is the one that covers everything else.

The setting that decides how often it asks

There is a single setting behind all of this, and you will meet it properly in module 11. Two facts are enough for now.

The mode you are in is shown at the bottom of the screen, and Shift+Tab cycles through the modes. The one a new install starts in is the cautious one: reads run freely, everything else asks. There are modes that stop asking about edits, a mode that stops asking about almost everything, and a mode that plans without touching anything. They are worth choosing on purpose later, once you have a feel for what you are approving. Cycling into one by accident and then wondering why the prompts stopped is a bad first experience, so if the prompts do go quiet, look at the status line before you look for a bug.

Check yourself

  1. You approved an edit, then approved a shell command with the “don’t ask again” option. Which of those two decisions is still in effect tomorrow?
  2. /rewind opens and offers you nothing but conversation options. What does that tell you about how the last change was made?
  3. You want to decline a permission prompt and tell Claude what to do instead, without waiting for it to finish and then correcting it. Which key, and on which answer?

Next: you can undo a file now. Module 2 is about the thing you cannot undo as neatly, which is Claude quietly stopping doing what you told it to do an hour ago.