DEV Community

Nova Elvaris
Nova Elvaris

Posted on

The Checkpoint Prompt: Save Your AI's Progress So You Never Lose Work

Long AI coding sessions have a failure mode nobody talks about: you're 45 minutes into a multi-step refactor, the context window fills up, and the model loses the thread. Everything after that point is confused, contradictory, or wrong.

The fix is dead simple: checkpoints.

How It Works

After every significant milestone, ask the AI to write a checkpoint:

We just finished migrating the auth module from callbacks to async/await.

Write a checkpoint summary that includes:
1. What we changed (files + functions)
2. What's working now
3. What's left to do
4. Any decisions we made and why
Enter fullscreen mode Exit fullscreen mode

The model responds with a structured summary. You save it.

The Checkpoint File

I keep a CHECKPOINT.md in my project root:

# Checkpoint — Auth Migration
Updated: 2026-04-04 10:30

## Completed
- [x] auth/login.js — converted to async/await
- [x] auth/register.js — converted, added error boundaries
- [x] auth/middleware.js — converted, updated Express error handler

## Decisions
- Kept bcrypt.compare callback (library doesn't support promises natively)
- Added try/catch at route level, not function level

## Next Steps
- [ ] auth/oauth.js — most complex, has 3 nested callbacks
- [ ] Update tests in auth/__tests__/
- [ ] Run integration suite
Enter fullscreen mode Exit fullscreen mode

Why This Beats "Just Use Git"

Git saves code state. Checkpoints save decision state.

When you start a new session, you can paste the checkpoint into the context:

Here's where we left off. Read this checkpoint and continue from "Next Steps."

[paste CHECKPOINT.md]
Enter fullscreen mode Exit fullscreen mode

The model picks up exactly where you stopped — not just the code, but the reasoning behind it.

The Recovery Pattern

When a session goes sideways mid-refactor:

  1. Don't keep prompting. Stop.
  2. Open your last checkpoint.
  3. git stash everything after the checkpoint.
  4. Start a new session with the checkpoint as context.
  5. Resume from the last known-good state.

This has saved me from at least a dozen "the AI got confused and now nothing works" spirals.

Automate It

I trigger a checkpoint prompt every 20 minutes during long sessions:

# checkpoint-reminder.sh
while true; do
  sleep 1200
  notify-send "🔖 Time for a checkpoint" \\
    "Ask your AI to summarize progress"
done
Enter fullscreen mode Exit fullscreen mode

Low-tech, but it works. The best checkpoint is the one you actually write.

Try it: Next time you start a multi-step AI task, set a 20-minute timer. When it rings, ask for a checkpoint. You'll be surprised how much clarity a forced summary creates.

Top comments (0)