Claude Code mod aims to move context compaction to task boundaries
state: expiredheat: lowuncertainty: mediumrelevance: mediumclaude-code context-management mods token-optimizationLippInc
What is this?
catnap is an open-source mod for Claude Code that prompts the model to finish its current task, write a handoff, and compact its conversation before the default auto-compaction threshold. Its creator, LippInc, reports no mid-task compactions across 129 naps and claims shorter handoffs and faster completion in tests; these are creator-reported results, not independently validated. It requires Claude Code 2.1.287 or later and has only been tested on Windows and Linux.
Why it matters
catnap targets a familiar pain point in long coding-agent sessions: automatic context compaction can interrupt work, and a compressed summary may omit useful state. Its approach—prompting Claude to finish a task and write a handoff before compacting—offers a practical, testable workflow change for Claude Code users, rather than a new model capability. If the reported results hold, it could make long sessions smoother; lowering Claude Code’s existing compaction threshold may deliver much of the same benefit without installing a mod.
Current assessment
LippInc’s open-source catnap mod prompts Claude Code at 50% context usage to finish its current piece of work, write a handoff, and compact; stricter prompts at 60% and Claude Code’s default auto-compaction at 70% act as fallbacks, according to the author. LippInc reports zero mid-task compactions across 129 naps (98 benchmark runs and 31 personal sessions), and says its handoff was shorter than the default summary while memory-test recall was identical in the tested runs. The author also reports end-to-end completion times of 406 seconds versus 464 seconds, and 56% fewer tokens compared with default compaction near the context limit; the post notes that lowering the default threshold gets most of the token savings. These are creator-reported tests, not independent evaluations; the memory test used made-up coding tasks on a 200K context window, and the evidence does not establish performance across other workloads or Claude Code versions. The mod requires Claude Code 2.1.287 or later and has been tested on Windows and Linux. Useful for Claude Code users who experience disruptive mid-task compaction, but its incremental value over adjusting the built-in threshold remains uncertain.
Measured heat
no measured readings yet — the hourly heat pass fills this in
How the heat travelled
Evidence (1) — ⭐ canonical anchor
Interpretation history
2026-10-21T12:03:11Z
audience grounding: medium — catnap targets a familiar pain point in long coding-agent sessions: automatic context compaction can interrupt work, and a compressed summary may omit useful state. Its approach—prompting Claude to finish a task and write a handoff before compacting—offers a practical, testable workflow change for Claude Code users, rather than a new model capability. If the reported results hold, it could make long sessions smoother; lowering Claude Code’s existing compaction threshold may deliver much of the same benefit without installing a mod.
Decision trace
- 11-04 11:20expireexpired deterministically: single-evidence seed quiet 14 days (lifecycle)
- 10-21 23:03groundcatnap targets a familiar pain point in long coding-agent sessions: automatic context compaction can interrupt work, and a compressed summary may omit useful state. Its approach—prompting Claude to fi
- 10-21 11:30groundThe catnap mod implements proactive handoff at 50% context — a concrete instance of the 'predictable forgetting' and 'zero-loss handoff' patterns Scott's long-running-agents a
- 10-21 10:23attention_candidatecreate
- 10-21 09:06createReleased mod addressing a known pain point (mid-task auto-compaction) with a concrete mechanism; token-optimization is a hot topic.