AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 4, 2026, 06:00 JST

Esc, /rewind or /clear: Claude Code's three-step guide to steering AI work

Send on LINE
Esc, /rewind or /clear: Claude Code's three-step guide to steering AI work

3 Key Points

  1. What happened

    Claude Code's official guidance says Esc halts a running action while keeping work done so far, /rewind restores code, conversation or both to an earlier prompt, and /clear empties the conversation to start over.

  2. Why it matters

    The guidance positions stopping, rewinding and clearing as escalating options, so the cost of a wrong turn is lower and a fresh start after two failed fixes is the recommended path.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

Claude Code's documentation frames session control as a ladder rather than a single undo button. The first rung is Esc, which stops a running action but keeps the work already done, so a user can correct direction without losing ground. The second is /rewind, which opens a list of earlier prompts and lets the user choose whether to restore code, conversation, or both; the code option appears only when tracked file changes exist after that point. The documentation argues that having a rewind available lowers the psychological cost of trying a bold approach first.

The third rung is /clear, which empties the conversation. The guidance is specific: if two consecutive fixes on the same point fail, a third correction only feeds the model more failed attempts, so clearing and writing one new prompt that folds in what was learned works better almost every time. The cost guidance adds a second use: clear when moving to unrelated work, because old context consumes tokens in every later message.

The documentation also draws the boundary of what checkpoints can undo. Changes made only by Bash commands, most sub-agent edits, manual changes outside Claude Code, and edits from other concurrent sessions are normally not tracked, so Git remains the tool for permanent history and collaboration. A summary option inside /rewind compresses the conversation without touching files on disk, and the guidance points to /branch or claude --continue --fork-session when a user wants to try another approach while keeping the original session intact.

FAQ
What are the three options and when should I use each?
Use Esc right after the direction starts to drift, /rewind when a tried method failed, and /clear when two fixes on the same point did not work or when moving to unrelated work.
What does /rewind not restore?
Files changed only by Bash commands, most sub-agent edits, manual changes outside Claude Code, and edits from other concurrent sessions are not tracked, so Git is the fallback.
How long are checkpoints kept?
Snapshots cover the most recent 100 checkpoints, and by default they are deleted about 30 days after the last save, after which rewinding may fail.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDrax and Brookfield stake £20 billion on 1GW UK AI data center