← ClaudeAtlas

handoff-autolisted

Automatic session-handoff across Claude Code context compaction. Hooks keep a live handoff fresh, guarantee a deterministic floor at the compaction boundary, and re-inject it after compaction/clear so the agent resumes with intent intact — no manual /handoff. Use when setting up auto-handoff, surviving auto-compact, "don't lose context when it compacts", installing the handoff hooks, or wiring PreCompact/SessionStart/UserPromptSubmit for continuity. Complements the manual `handoff` skill.
OneDro1d/dark-factory · ★ 0 · AI & Automation · score 70
Install: claude install-skill OneDro1d/dark-factory
# handoff-auto — automatic handoff across compaction ## What this is Claude Code compacts the conversation when context fills (auto-compact ~95%), and the lossy summary drops decisions, intent, and nuance. This is the **automatic** complement to the manual [`handoff`](../handoff/SKILL.md) skill: a set of hooks that make a usable handoff **always exist** and get **re-injected after compaction** — with zero manual `/handoff`. **Option B** (chosen from a 3-option design study in `docs/02-design-options.md`): a live model-maintained handoff with a deterministic safety-net. ## Why it works this way (the binding constraint) You **cannot** trigger "at exactly 90% context used" — Claude Code does not expose live context % to hooks, and auto-compaction is internally controlled. So instead of chasing a threshold, this keeps the handoff **always-ready**. See `docs/00-research-findings.md`. ## How it works — the spine ``` UserPromptSubmit ── nudge ──▶ model keeps <cwd>/.claude/handoff/handoff-latest.md fresh (≤120 lines, secrets redacted) [soft, silent] PreCompact ─────── flush ───▶ if that handoff is missing/empty/stale, write a deterministic jq snapshot from the transcript [hard floor, exit 0] SessionStart(compact|clear) ─ inject the cwd-scoped handoff as the next turn's context (dual-field JSON, age-gated) [resume] ``` The soft per-turn nudge