Back to browse
GitHub Repository
12 starsPython

Claude-Stream-Compactor

by ndr·Feb 18, 2026·5 points·0 comments

AI Analysis

MidNiche GemShip It

Smart hysteresis compaction for Claude Code, but limited to single API and not a general problem.

Strengths
  • Two-threshold hysteresis design is clever — defers expensive compact until 50%, swaps at 70% to avoid repeated trigger-flapping
  • Zero additional API calls — reads usage fields already in JSONL; no billing impact from the hook itself
  • Genuine friction point: context exhaustion mid-session is real for Claude Code users doing long coding tasks
Weaknesses
  • Manual resume step breaks the 'background' promise — defeats async benefit if you have to copy-paste /resume command anyway
  • Audience is Claude Code CLI users only; when Anthropic adds native auto-resume hooks, tool becomes obsolete
Target Audience

Claude Code users with long-running sessions

Similar Projects