Back to projects
Active Started Sep 2025

Bookmark

Context snapshots for Claude Code. Restores session state across compactions, terminal closures, and restarts with zero manual steps.

Node.js Claude Code Hooks

The Answer

Bookmark captures Claude Code session context automatically and restores it when you return, so every new terminal starts where the last one stopped.

The Problem It Solves

Claude Code sessions are ephemeral. Context evaporates three ways: compaction compresses the conversation and drops detail, closing the terminal starts a blank session, and switching between projects strands yesterday’s decisions in a summary nobody reads. The recurring tax is re-explaining architecture, decisions, and open items every morning.

How It Works

Four hooks handle capture and restore without consuming tokens.

HookWhenWhat it does
PreCompactBefore the transcript is compressedSnapshots full context
StopSession endsWrites a final snapshot
SessionStartNew session beginsRestores the most recent snapshot into context
UserPromptSubmitEvery user messageChecks whether a time-based snapshot is due

Snapshots are parsed from the transcript, not generated by an LLM. That keeps them free, deterministic, and fast. Each snapshot carries the active task, recent decisions, files touched, and unresolved items.

Why This Design

Running as an external process keeps zero tokens in your context window. Parsing the transcript rather than summarizing via a model sidesteps the cost and drift of LLM-generated memory. The hooks mean the workflow is “install it, forget about it, pick up tomorrow.”