handoff-compact: Claude Code mod auto-writes handoff docs instead of autocompact summary

speciallight · reddit · 2026-10-03

The author measured long unattended Claude Code sessions and found half the tokens came from turns past 200k context — expensive per-step resends plus quality decay from context rot. The handoff-compact plugin intercepts the autocompact trigger: a fork of the full session writes a structured handoff doc (goal, state, next step, decisions and rationale, ruled-out approaches, open questions, files/commits, verify command, last 10 prompts verbatim), then replaces the conversation — handoff + /clear mid-turn with nobody at the keyboard. MIT licensed, needs Claude Code 2.1.287+ with mods; /compact classic restores the built-in summary.

Original post →

More from coding & agent

coding & agent channel →