โ—† Vibe EngineeringSMIT ยท AI Agentic Engineering Urdu
Class 7 ยท 7.2

Sessions, checkpoints & Git: managing your workflow

Three overlapping ways to move backwards and forwards through a project โ€” and it muddles almost everyone at first. Here's exactly how sessions, checkpoints and Git differ, and how to combine them.

๐ŸŽฏ Goal: never lose your placeโฑ Read: 10 min๐Ÿงญ Type: concepts

Claude Code gives you a wonderfully flexible way to move through a project โ€” arguably too flexible. There are several overlapping ways to "go back to where I was," and it can muddle beginners. This page untangles them: what each one is, how they fit together, and a workflow you can actually adopt.

01Three tools, three jobs

They live at different levels of granularity and answer different questions. Hold this picture in your head and the confusion evaporates.

SESSIONS Coarse ยท the whole conversation & context โ€” resume a named state a week ago yesterday now CHECKPOINTS Fine ยท every prompt is a step โ€” rewind conversation and/or code GIT Bulletproof ยท snapshots of the code only โ€” commit as often as you like
Sessions track the conversation; checkpoints track prompt-by-prompt steps (and can revert code); Git tracks the code. Orthogonal tools for orthogonal jobs.

02Sessions โ€” resume a whole conversation

A session is the complete state of your conversation with Claude: the context, the history, what you were doing. You can name a session at any point, which records that state, and later resume it to pick the conversation back up.

Resuming restores the conversation, not the code

This is the crucial catch. When you resume a session you get back the context and conversation as they were โ€” not the state of your files or repo. Sessions are about what you and Claude were talking about, nothing more.

Claude Code
# inside Claude โ€” name the current session
/rename snarky-claude

# later, from the shell โ€” resume any past session
claude --resume        # pick from a list of named sessions
claude                   # or just continue where you last left off

In the demo we told Claude to be "witty and snarky," renamed the session snarky-claude, quit, and later brought it back to life with claude --resume โ€” and sure enough its snarky personality returned, because the whole conversation state came back with it.

03Checkpoints โ€” rewind step by step

Within a single session, every prompt you send is a checkpoint โ€” a step in time. Rewinding walks back through those steps. And here's the powerful part: at each step you can choose to restore the conversation, the code, both, or neither.

The catch: Claude only knows about changes it made

Rewinding code works for edits Claude made directly. But if, during that prompt, Claude ran a script that changed files โ€” or you did โ€” Claude isn't keeping a copy of your disk at each step, so it can't revert those. Always be conscious of exactly what a rewind will and won't undo.

04Git โ€” the bulletproof snapshot

Sitting orthogonal to both is Git: the proper, long-term way to snapshot your code and return to any point. It has nothing to do with the conversation โ€” and you can commit as often as you like, even several times within a single chat. Git is the safety net the other two don't provide.

terminal
git add .
git commit -m "before the risky refactor"
# ...let Claude work, then if needed:
git restore .            # throw away uncommitted changes
git checkout <commit>     # return to a known-good snapshot

05Which should you use? A working philosophy

The honest answer: whatever fits your mode of working โ€” these tools bend around your workflow, not the other way round. Here is one battle-tested approach you're welcome to copy or ignore.

Primary

Git, constantly

Commit as you go, with meaningful messages, so any point is recoverable.

Occasional

Checkpoints

Rewind for something that just went wrong and is easy to undo immediately.

Rarely

Sessions

Resuming week-old conversations can be confusing โ€” hard to track what's in context.

Markdown files as your real memory

It's "very 2025," but tracking progress in CLAUDE.md, plan.md and friends gives a crystal-clear, human-readable picture of where the project stands. Many people succeed with sessions too โ€” but files beat scrolling back through a week-old chat trying to remember what was said.

โœ“ Key takeaways

  • Sessions = coarse; resume a whole conversation/context (not the code). Name with /rename, restore with claude --resume.
  • Checkpoints = fine; every prompt is a step, and rewind can restore conversation and/or code.
  • Rewind only undoes changes Claude made directly โ€” not files touched by scripts.
  • Git = bulletproof; snapshots the code, independent of the conversation. Commit often.
  • No single "right" tool โ€” pick what fits you. A strong default: Git heavily + Markdown files to track progress.