Skip to the content.

Smarter Compact

Context management (smart compaction) keeps long coding-agent sessions under a token limit without an LLM summary. Every message goes into a local SQLite session store; older turns leave the context and the turn they precede carries a pointer to them.

Smart compaction animation

The agent searches the store with smart_compact_search, smart_compact_sql, and smart_compact_get when it needs a detail back. The cut stays put on later requests, so the prompt cache keeps hitting.

Learn more

Smart compaction How trimming works, ContextBench results, agents, MCP tools
Context research Related work, design evidence, strict runs through Run E
Context proxy LiteLLM proxy, env vars, proxy port, token estimate
Context store File layout, schema, trim rules, search and SQL
OpenCode Plugin install and options

Install and quick start: README on GitHub.