Claude Code

Verified against Claude Code · 2026-07-25

Use Claude Code's checkpoint and rewind deliberately, not as an afterthought

A discipline prompt for sequencing a risky experimental change around Claude Code's checkpoint and rewind feature, distinguishing what a rewind actually restores — conversation and file state — from what it cannot undo, such as an external side effect already sent, so genuinely irreversible steps are never attempted before a checkpoint exists.

Claude Code5 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

You are about to attempt a change worth treating as an explicit experiment, using Claude Code's checkpoint and rewind capability as the actual safety mechanism, not git commits as an afterthought if something goes wrong. Rewind restores the conversation and the file state in this working directory to an earlier point — it does not undo anything that already happened outside this session's own file edits, and that distinction has to shape the order these steps happen in, not just be noted after the fact.

EXPERIMENT
Trying a different caching strategy for the prompt search index to see if it actually improves lookup latency before committing to it.

THE SPECIFIC RISKY STEP
Regenerating the search index in place rather than to a separate file, which overwrites the existing working index while testing.

EVERYTHING THIS EXPERIMENT MIGHT DO THAT REWIND CANNOT UNDO
Nothing in this experiment calls an external API or sends a request; the only external effect would be if a build step deploys the changed index to a shared location, which is explicitly not part of this experiment.

CHECKPOINT MOMENTS
Immediately before regenerating the index in place, and again once the new index is confirmed to load correctly.

BEFORE STARTING
Confirm a checkpoint exists, or will exist, at each moment named in Immediately before regenerating the index in place, and again once the new index is confirmed to load correctly. — a checkpoint taken after the risky step has already run protects nothing about that step, it only protects whatever comes after it.

SEQUENCING RULE
Order every action in this experiment so that anything listed in Nothing in this experiment calls an external API or sends a request; the only external effect would be if a build step deploys the changed index to a shared location, which is explicitly not part of this experiment. happens last, after every reversible step has been tried and confirmed working, never first for convenience or because it happens to be the most direct path to testing the idea. If Regenerating the search index in place rather than to a separate file, which overwrites the existing working index while testing. genuinely must happen early to test the hypothesis at all, say so explicitly and treat it as a decision that trades away the safety net for that one step specifically, rather than treating rewind as a blanket guarantee that quietly does not apply to the step that actually needed it most.

WHILE EXPERIMENTING
- After each reversible step, state explicitly that this is a safe point to rewind to if the next step goes wrong, so the checkpoint boundary is a known, communicated fact, not an implicit assumption about how the tool happens to work.
- If a step turns out to have an external side effect that was not anticipated in Nothing in this experiment calls an external API or sends a request; the only external effect would be if a build step deploys the changed index to a shared location, which is explicitly not part of this experiment., stop immediately, name it, and treat that discovery itself as new information about what a subsequent rewind can and cannot restore, rather than continuing as though the safety net still fully applies.

IF THE EXPERIMENT FAILS
State plainly whether rewinding restores a clean starting point given what actually ran, or whether The previous index file is also backed up separately outside this working directory as a manual fallback, in case rewind alone is not sufficient. is now the real recovery path because something in Nothing in this experiment calls an external API or sends a request; the only external effect would be if a build step deploys the changed index to a shared location, which is explicitly not part of this experiment. already executed — do not assume rewind alone is sufficient once a listed side effect has actually fired, even if the remaining file state looks clean.

OUTPUT
The sequenced plan with checkpoint boundaries marked explicitly, and, once the experiment concludes, an honest statement of what state this leaves things in and whether a rewind at this point would actually return to a clean starting state.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

Claude Code's rewind restores conversation and file state to an earlier point in the same session, which is a genuinely useful undo mechanism for exactly the category of mistake it covers — an edit that turned out to be wrong, a direction that did not pan out — but it is not a universal undo for everything a session might have caused, because anything the session did outside its own file edits, such as an API call already sent or a message already delivered, already happened in the world the moment it happened and rewinding the conversation afterward does not reach back and unsend it. The sequencing rule that puts every genuinely irreversible action last exists precisely because the natural order to test a hypothesis is often the most direct one, and the most direct path to testing an idea does not automatically avoid triggering its irreversible step early — an experiment structured around testing the safe parts first and only then risking the unsafe part, once everything else is already confirmed working, gets exactly the same information with strictly less exposure than testing them in whatever order occurred to the model first. Naming a checkpoint moment explicitly and stating out loud that it is a safe point to return to converts an implicit assumption about how the tool behaves into a communicated fact both the human and the model are tracking the same way — a checkpoint nobody can point to with confidence is not meaningfully different from no checkpoint at all, since its value depends entirely on someone actually using it at the right moment, and that requires knowing precisely which moment that is. The instruction to treat an unanticipated side effect as new information that changes what a subsequent rewind can restore, rather than continuing as though the safety net still fully applies, matters because the entire premise of this discipline is a clean separation between the reversible and irreversible parts of an experiment — the moment something crosses that line unexpectedly, the plan's own safety guarantee has silently changed, and continuing to rely on it without re-evaluating is treating a stale assumption as though it were still current, the same failure this whole discipline exists to prevent in the first place.

Verified against

Claude Code Sonnet 4.6 · 2026-07-25

Changelog

  • 2026-07-25 — Initial publish, verified against Claude Code checkpoint/rewind (Sonnet 4.6).

Building this for real?

This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
All Claude Code prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY