May 26, 2026

How to use Claude Code hooks to save progress automatically between sessions

You finish a Claude Code session, close the terminal, and realize you left nothing useful for tomorrow. Here is how to wire Claude Code hooks so progress gets saved automatically before the session goes cold.

How to use Claude Code hooks to save progress automatically between sessions

You finish a good session in Claude Code, close the terminal, and tell yourself you will remember where you left off. Tomorrow you open the repo again, scroll through the last few edits, and realize you left yourself nothing useful. No next step. No summary. No note about the half-finished refactor that made sense last night.

That is the part that hurts. The work is not gone, but the shape of it is. You can see the changed files, but not the thread you were following when you changed them. So the next session starts with reconstruction instead of momentum.

This is a session handoff problem.

Most people think they need more discipline here, like they should just remember to leave better notes before quitting. In practice, that rarely holds. You stop because dinner is ready, your laptop battery is dying, Claude hit the end of a long session, or you simply reached the end of your attention. The exact moment when a handoff note would help most is usually the moment when you are least likely to write one.

That is why manual notes fail so often. They depend on you doing one more thing after the work already feels done. If the handoff only happens when you remember, it is not really part of the workflow. It is a best intention.

The fix is to move the handoff into Claude Code itself. KeepGoing can wire Claude Code hooks so a checkpoint is saved automatically when the session stops or ends. Instead of relying on memory, the hook runs keepgoing save --hook for you. That records a usable summary, next step, branch, and session state right when you are about to leave, while the context is still fresh.

The easiest way to set it up is:

curl -fsSL https://keepgoing.dev/install.sh | bash -s -- claude

If you already have KeepGoing installed, run:

keepgoing setup claude

That setup adds Claude Code hooks for the end-of-session path, so saving progress stops being something you have to remember. The checkpoint becomes the default outcome of closing a session, not an extra chore at the end of one.

What changes after that is small but important. You can end a session when you are actually done, or interrupted, without feeling like you need to do cleanup first. When you come back, you are not reading raw diffs and trying to reverse-engineer your own thinking. You have a handoff note that was captured automatically, at the moment the session ended, with a clear next step you can follow.

If you want to make this real today, spend five minutes setting up the Claude Code hooks and then end your next session normally. Tomorrow, open the same project and see whether you start by building, or by trying to remember. That difference is the whole point.

Get notified about new posts