Context Handoff
Preserve full session context across Claude conversations. Pack the current session — decisions, reasoning, work state, behavioral contracts, what was ruled out and why — and load it into any new chat. The new session resumes as if the conversation never ended.
Works for you, your future self, your teammates, and parallel Claude sessions.
Commands
All commands that prompt for confirmation accept --yes / -y to skip. See the Aliases section for shorthand forms.
| Command | What it does |
|---|---|
/context-handoff | Smart-route: resume active session or offer to create one |
/context-handoff pack [--project] [--global] | Create a context pack from the current session |
/context-handoff load [--quiet] [--project] [--global] [--state-only] [--contracts-only] | Load a context pack at the start of a new session |
/context-handoff update | Force-write an update to the current session's pack |
/context-handoff verify | Diff Claude's stated session understanding against what's actually in the pack file |
/context-handoff status | Quick health check for the current session |
/context-handoff list [query] [--all] [--limit <n>] [--tag <tag>] | List packs, optionally filtered; defaults to 20 most recent |
/context-handoff open <pack> [--full] | View a pack's summary and first 40 lines without loading it |
/context-handoff search [--project] [--global] <query> | Search pack content across all packs (or project-only with --project) |
/context-handoff threads [--project] [--global] | All open threads across packs, sorted by priority |
/context-handoff add-thread <text> [--priority high|medium|low] | Add an open thread to the active pack |
/context-handoff close <thread> | Mark an open thread as resolved |
/context-handoff notes | List all notes in the active pack |
/context-handoff note <text> | Add a quick observation to the active pack |
| `/context-handoff import <file | url>` |
/context-handoff sync [--source <name>] [--since <duration>] | Pull recent context from connected MCP integrations (Granola, Slack, Linear, GitHub, etc.) — optional, degrades gracefully if no MCPs connected |
/context-handoff contracts | View and edit active behavioral contracts |
/context-handoff amend-decision <partial-what> | Edit an existing decision's reasoning in the active pack |
/context-handoff diff [--vs-current] [pack1] [pack2] | Compare two packs, or a pack against current git state |
/context-handoff merge [--dry-run] <pack1> <pack2> [output-name] | Merge two packs into a combined pack |
/context-handoff rename <pack> <new-name> | Rename a pack and update its topic field |
/context-handoff tag <pack> <tag> [--remove] | Add or remove a tag on a pack |
/context-handoff archive [--project] [--global] [--older-than <days>] | Move old packs to archive/ subdirectory |
/context-handoff delete [--dry-run] <pack> | Delete a saved session by name |
/context-handoff fork [--project] [--global] <pack> [<new-name>] | Create a variant of an existing pack for a parallel approach |
/context-handoff export <pack> [--format markdown|json] [--output <file>] | Export a pack to a clean shareable format |
/context-handoff profile [edit] | View or edit your persistent personal profile — context that loads automatically in every session |
/context-handoff setup | Interactive first-time setup wizard |
/context-handoff doctor [--clean] | Check hook installation, dirs, active session, and skill version; --clean removes orphaned .active entries |
/context-handoff version | Show the installed skill version |
/context-handoff help | Show a compact in-session command reference |
No-argument invocation
When /context-handoff is invoked with no subcommand, smart-route based on session state:
- Check
~/.claude/handoffs/.activeand.claude/handoffs/.active - Active pack found (updated <= 4 hours ago):
"Resume [topic] from [X ago]? (y/n)"
- Yes: run
/context-handoff load [pack] - No: ask "Create a new session pack instead? (y/n)" — if yes, run
/context-handoff pack
- Yes: run
- No active pack (or stale):
"No active session. Save this conversation as a context pack? (y/n)"
- Yes: run
/context-handoff pack - No: show
/context-handoff help
- Yes: run
This is the recommended entry point for users who don't remember command names.
First-time onboarding
When any /context-handoff command is invoked and ~/.claude/handoffs/ does not exist:
Show this exactly once before executing the command:
context-handoff remembers your sessions. Decisions made, things tried and rejected, where you left off, how you like to work — all of it restored when you come back. Type
/context-handoff helpto see all commands.
Then execute the original command. Never show this message again once the directory exists.
This ensures first-time users understand what they're getting without reading the README first.
/context-handoff pack [--project]
Synthesize the current conversation into a context pack file.
Scope:
- Default: save to
~/.claude/handoffs/ --project: save to.claude/handoffs/inside the current git repo. If not in a git repo: error "Not in a git repo — cannot use --project scope"
Steps:
- Infer the topic from the conversation (or ask the user if ambiguous)
- Create the target directory if it doesn't exist
- Stale session check: If
~/.claude/handoffs/.active(or.claude/handoffs/.activefor--project) already exists and thelast_updatedtimestamp in that pack file is 4 hours old or older, surface it before proceeding. When--projectis active, check.claude/handoffs/.activefirst; if no cwd entry found there, fall back to~/.claude/handoffs/.active. Use the first entry found. The same lookup order applies in step 5 when readingprior_session."Previous session detected: [topic] (last updated X hours ago). Load it, discard it, or ignore and continue?"
- Load: run
/context-handoff loadwith that pack - Discard: delete
.activeand proceed - Ignore: proceed without clearing
.active(user manages it)
- Load: run
- Same-topic detection: Before generating the new pack file, compute the topic slug for the new pack. Topic slug: lowercase the topic string, replace spaces and special characters with hyphens, strip leading/trailing hyphens, truncate to 40 characters. Example: 'Auth Refactor (JWT)' → 'auth-refactor-jwt'. Check whether any file matching
*-<topic-slug>.mdalready exists in the target directory. If found, surface it before proceeding:"A pack for this topic already exists: 2026-05-16-vibe-safe-release.md (last updated X ago, N updates). Update it or create a new one?"
- Update: run
/context-handoff updateon that pack (rewrite with current session state, incrementupdate_count) - New: proceed with creating a new dated file
- Update: run
- prior_session auto-population: If
.activeexists and is valid (not stale), setprior_sessionin the new pack's frontmatter to the path of the currently active pack before writing. - CLAUDE.md seeding: Before synthesizing behavioral contracts from the session:
a. Check if
CLAUDE.mdexists in the current directory or~/.claude/CLAUDE.mdb. If found, read it and extract any behavioral instructions (style, process, constraints) c. Seed these intobehavioral_contractsprefixed with[CLAUDE.md]so they're distinguishable from session-derived ones - Integrity hash: After step 6 (CLAUDE.md seeding) completes, compute content_hash by normalizing the pack content (set
content_hash: "") then SHA-256 hashing the UTF-8 LF-normalized bytes. Store the resulting hex digest incontent_hashand write the file once. On