Claude Code sessions (or any coding agent of your choice) build up real understanding of your codebase, but it all lives in context. Once that fills up, /compact compresses hours of work into a few sentences.
The idea is that contextual memory virtualisation snapshots that context so you can branch from it later. Spend 40 minutes mapping your codebase, snapshot it, then fork into independent sessions for each task, that way they all sharing the same base understanding. When context gets bloated, trim strips the dead weight (raw file contents, base64 blobs) while keeping every message verbatim. 50-70% smaller, nothing lost from my testing.
TLDR; build understanding once, reuse it, trim the bloat.