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.
More from coding & agent
- Dev ports Meta's open-sourced Muse gadget to ESP32 devices, gets it running with Claude — alexandr_wang · 2026-10-04
- Engineer builds HDL benchmark in one day with Claude, originally estimated at 59 days — IgorCarron · 2026-10-04
- Latent communication papers: KV-cache integrity vs malicious agents and state-delta hybrid channels — burny_tech · 2026-10-04
- Codex beats Claude Code at computer use and brevity, says AI researcher — Yuchenj_UW · 2026-10-04
- Compiler-backed agent Benzi hits 78.2% SWE-bench Verified at under 10 cents per fix — DonkeyTheKing · 2026-10-04
- pstack 0.15.9 ships /correct skill that fixes agents by changing the environment — RachelVT42 · 2026-10-04