Pillar 9 · Blog · 2026-05-02

The /compact Command: Token Savings in Long Sessions

Hit /compact at ~60% context, not at the 'oh no' stage. MindStudio's benchmark shows that timing alone cuts input tokens 35-50% on coding tasks vs auto-compaction at 95%. StartupHub measured 15-20% lower latency on Opus 4.7 after a manual compact. Context hygiene as a habit, not a fire drill.

D5D3compactcontexttokens
Painterly walnut desk with a brass mechanical archival press compressing an over-stuffed accordion file folder labelled CONTEXT.

What just happened

Most people think long Claude chats get expensive because the model is 'thinking harder'. Not exactly. A lot of the cost is just carrying conversational luggage turn-to-turn — stale tool output, dead-end attempts, repeated instructions. Two recent benchmarks (MindStudio May 1, StartupHub May 2) put numbers on a habit that pass-takers already use intuitively: hit /compact *before* you need to.

What /compact actually does, and when

  1. Compact at ~60% context, not 95%. MindStudio's benchmark: manual /compact at 60% cut input tokens 35-50% on coding tasks vs auto-compaction at 95%. Waiting until the 'oh no' stage means you've already paid for the bloat.
  2. Latency drops too. StartupHub measured 15-20% lower latency on Opus 4.7 after a manual compact. Cost goes down; the chat also gets snappier. Both wins from one keystroke.
  3. Restart in a fresh chat with the summary. The non-obvious move: take the compacted summary and paste it into a brand-new conversation as the system prompt. You keep task continuity with far fewer tokens.
  4. Compact at phase boundaries, not during a fire. End of debug session, end of feature scaffolding, end of code review. Boundary points beat reactive ones. Treat it like git commits — small, frequent, semantic.
  5. Specify what to keep. Use a hint: /compact keep the current objective, key decisions, modified files, and unresolved blockers. Don't trust the default summary to preserve case-facts you'll need later.

Why this matters for the exam

The CCA-F D5 domain (15%, smallest by weight, biggest by careless-wrong-answers) hammers the progressive-summarization trap — the failure mode where context compresses away exactly the case-facts you need. /compact is the operator-side answer. Pair it with a pinned case-facts block and the trap doesn't trigger.

Three /compact mistakes

Compacting reactively, at 90%+ usage

By the time you notice latency, the bloat has already been priced in for many turns. Compact early, compact often.

Trusting the default summary to preserve case-facts

The default summary is generic. If your task depends on specific account IDs, prior decisions, or a multi-step plan, name them in the /compact hint.

Not restarting in a fresh chat after compacting

Compaction inside the existing session doesn't undo the prior tokens — they were already paid for. The full win comes from compacting AND opening a fresh chat with the summary.

Sources

06 · Read next in the pillars

Where this lands in the exam-prep map

Each blog post bridges into the evergreen pillars. These are the most relevant follow-ups for this story.

07 · FAQ

4 questions answered

What does /compact actually do?
Generates a summarized version of the current conversation context — not a memory upgrade, more like asking a colleague to turn a 40-message Slack thread into the 6 lines that still matter. The summary then replaces the raw history in the model's working context.
Why compact at 60%, not 95%?
Because by 95% you've already paid the attention tax on every prior turn. Compacting early reduces the per-turn input-token cost on the upcoming work. MindStudio's benchmark put the savings at 35-50% input tokens.
How is /compact different from auto-compaction?
Auto-compaction kicks in when the context limit is approached — late, reactive, generic. Manual /compact is early, scheduled, hinted: you call it at phase boundaries with a guidance string for what to keep. Both exist; the manual habit is what saves cost.
Does this map to a CCA-F domain?
D5 (Context Management & Reliability, 15%). Expect questions on lost-in-the-middle, progressive-summarization traps, and the case-facts block discipline. Knowing /compact as the operator-side fix is exam-relevant.

Synthesized from research output on 2026-05-02. LinkedIn cross-post pending.
Last reviewed 2026-05-06.

Blog post · D5 · Pillar 9 · Blog

The /compact Command: Token Savings in Long Sessions, complete.

You've covered the full ten-section breakdown for this primitive, definition, mechanics, code, false positives, comparison, decision tree, exam patterns, and FAQ. One technical primitive down on the path to CCA-F.

Share your win →