§claudecompress v0.7.0 · github · npm
For Claude Code

Three things Claude Code is missing.

A cache-TTL countdown inside the status line, a /compress slash command for mid-session trimming, and an offline trimmer that makes cold /resume cheap again.

$bun add -g claudecompresscopy
$claudecompress installcopy
§ 01/compress

Trim without leaving.

Type /compress. A trimmed sibling JSONL is written with a new UUID, savings printed, resume command handed to you. Six modes, surgical to nuclear. Original untouched.

Or run under ccw — it auto-resumes the trimmed session on Ctrl+C.

┌─ claudecompress ────────────────────────────────┐ mode: focus (last 5) · dropped thinking tokens: 761k 217k (saved ≈ 544k) cold $ $11.41 $3.25 (saved ≈ $8.16) trimmed: 17420d99-7152-4359-bfdd… └────────────────────────────────────────────────┘ Ctrl+C, then: claude --resume 17420d99…
§ 02Offline trimmer

One command, any session.

For sessions you didn't trim live. Picks up your project, flags staleness, shows per-session cost, writes a new JSONL beside the old.

$ bunx claudecompress # lists your sessions, staleness, cost # pick a mode, confirm # new trimmed JSONL lands beside the old
§ 03Savings

A 761k Opus session, six modes.

Real numbers. 153 user turns in the session. Focus 5 is the recommended default — keeps the last 5 back-and-forths verbatim plus a dialog-only trail of everything older. Cuts cold-resume cost by ~70% while leaving enough recent context to keep working. Ultra is the nuke.

Mode Tokens Cold cost Saved
None (baseline)761k$11.41
Redact503k$7.54$3.87
Recency 15574k$8.61$2.80
Focus 15327k$4.91$6.50
Focus 5217k$3.25$8.16
Ultra125k$1.88$9.53
§ 04Install

Install. Restart. Done.

Install global — the status line ticks every second and needs fast startup. Bun preferred, node fine. settings.json is backed up; nothing overwritten without a prompt.

$ bun add -g claudecompress # or: npm i -g claudecompress $ claudecompress install # pick: hook, status line, or both # quit and relaunch Claude Code.