Glossary · Compaction

Compaction.

Summarize the past to afford the future.

Direct answer

Compaction summarizes a near-full conversation into a high-fidelity seed and restarts a fresh window with it, the standard lever for long-horizon tasks that exceed any context window. Done well it preserves decisions, open threads, and invariants while dropping resolved subtasks and verbose tool dumps. Done blindly (auto-compact at 80–95%) it paraphrases exact code into lossy prose at the worst moment, so manual compaction with keep/drop directives beats automatic.

In Anvaya

How We Implement It.

01CompactionAnvaya compacts structurally, not textually: SessionSynthesizer distills sessions into causal threads and typed nodes (~25x), so the next session reloads knowledge, not a summary of a summary.

Questions

Asked About Compaction.

Q

When should I compact manually?

Before starting a fresh subtask: /compact with a keep-directive naming decisions and invariants, dropping the tangent explicitly.

Q

What must a compaction summary keep?

Decisions + why, open threads, invariants and hard constraints. Drop resolved subtasks, verbose outputs, abandoned attempts.

Q

Is the Compaction API a replacement for session splitting?

For open-ended work it helps; for structured spec→implement→verify flows, explicit fresh sessions still give tighter control.

Run Agents That Fit On Your Laptop.

25.6 MB median RSS. 25 agents ran in parallel on a Core 2 Duo with 4 GB RAM. Hundreds on your machine. Zero cloud required on the Ollama path.

Requires Rust/cargo to build from source. Linux and macOS today, Windows not yet supported. Pre-1.0, public beta. Pricing TBD.