MANUAL COMPACTION
Before auto-compact hits, compress it yourself.
Auto-compact erases parts of the session to fit the context. You do not choose what it summarizes.
/compact lets you ask for the compression explicitly, so you continue with the memory curated the way you want.
Useful before switching phases in a long task: research is done, implementation is next, compact the research into a summary and move on.
In practice
# Before switching phases in a long task:
/compact
# Or with a curated instruction:
/compact summarizing what we learned about the
hydration bug. Keep the main error's stack
trace and discard the rest.This practice is part of Claude Code OS, the full blueprint of the practices that separate following a tutorial from actually working with Claude. Ler em português.