pratikgh0se

Lossless Handoff — Development skill for Claude Code

Development community

Claude Code hooks for lossless context: a handoff before every auto-compaction, a per-project decisions list, and recall of exact earlier words (hybrid keyword + local semantic search).

How to install Lossless Handoff

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pratikgh0se/lossless-handoff and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Lossless Handoff does

Claude Code hooks for lossless context: a handoff before every auto-compaction, a per-project decisions list, and recall of exact earlier words (hybrid keyword + local semantic search). Based on the LCM paper (arXiv:2605.04050).

Alternatives in Development

  • Fast Jev Compaction — Claude Code plugin that replaces the compaction summary with Jev decisions: every tool call and result is scor 425 ★
  • Arrecall — AgentRecall on-demand recall — surface past fixes, decisions, and patterns mid-session without leaving your fl 370 ★
  • Kuato — Built for Claude Code but works in any agent that supports skills, easily recall what you discussed with your 176 ★

README

Lossless Handoff

**Claude Code hooks that make compaction safe: a handoff before every compaction, a decisions list per project, and exact-words search over every earlier chat.**

*Formerly claude-handoff.*

[![CI](https://github.com/pratikgh0se/lossless-handoff/actions/workflows/ci.yml/badge.svg)](https://github.com/pratikgh0se/lossless-handoff/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) [![Release](https://img.shields.io/github/v/release/pratikgh0se/lossless-handoff)](https://github.com/pratikgh0se/lossless-handoff/releases/latest)

![How a handoff flows through a compaction](docs/handoff-timeline.svg)

TL;DR

  • Without it: every compaction turns your session into a generic summary. The exact next step, the dead ends, your standing rules and your exact wording are gone, and the model re-does work or asks again.
  • With it: before each compaction a structured handoff is written and fed back in. Each project keeps a decisions list that survives compactions, and recall finds the exact words of earlier chats (keyword plus local semantic search). Python 3 standard library only.
  • Proof: 217 compactions with a handoff over 32 days on the author's machine, 0 hook errors logged, 497 of 497 sampled messages retrieved byte-identical. Details and caveats below.

Why this exists

I run Claude Code with a 400k auto-compact window (`CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000`) instead of the 1M default. With 1M, long sessions rarely compact and pay for their whole context on every turn. In a single-user estimate over 4.7 days, the shorter window gave about 19% lower API-equivalent cost.

The catch is many more compactions, and each one used to lose rules, decisions and exact wording. This tool is what makes running small and compacting often safe. I use it every day, on my own projects. It has one heavy user so far (see [Limitations](#limitations)).

Install

git clone https://github.com/p