Claude Code hookStable

claude-memory-checkpoint.

Long chats summarize themselves into project memory.

If you run several Claude Code chats about one project, each re-reads files and re-derives the same context, burning tokens. This hook counts tool calls and, past a threshold, has Claude drop a tight summary of the chat into project memory. Parallel and future chats load that instead.

Features

Zero ceremony

One PostToolUse hook. Install it and forget it; every chat checkpoints itself.

Per-chat counters

Keyed by session, so each long chat checkpoints independently.

Summaries that matter

Captures what a future chat would re-derive: what changed, key decisions and why, open threads.

Tunable

MEMORY_CHECKPOINT_EVERY sets the cadence; 250 tool calls by default.

Plays nice

The installer merges into settings.json without touching your existing hooks, and re-running never duplicates.

Works with auto-memory

Writes into Claude Code's own auto-memory directory, derived from your project path.

Quickstart

git clone https://github.com/jay739/claude-memory-checkpoint
cd claude-memory-checkpoint
./install.sh