See the evidence ↗Read the original ↗Report

Shown·Claude Code

Compact Claude Code between tasks

The author built catnap, a Claude Code plugin that tells Claude at 50% context to finish its task, write a handoff, and trigger compaction itself.

Resultrc_6J0TK6KW

After adopting catnap, 0 of 129 compactions hit mid-task, versus 78 of 82 before. It used 56% fewer tokens than default auto-compact.

ShownHN · Oct 20 · Last checked

Overview

How it was set up

Claude Code plugin using the mods feature (needs 2.1.287 or later). Thresholds at 50%, 60% and 70% context are all settings. Tested on Windows and Linux.

Worth knowing

Claude Code only. The memory test used made-up coding tasks on a 200K window. Lowering the default auto-compact threshold gets most of the way there.

A prompt to start from

The source does not show the prompt.

Sources 1

History

Source published
2026-10-20
Added to Agentic Feats
2026-10-26
Pick
No
Markdown copy
/c/compact-claude-code-between-tasks.md

More in setup and meta

38 feats