oh-my-pi open-sources agent context compaction design docs, now at 31k GitHub stars
nirmal_dist · x · 2026-09-15
oh-my-pi (by can1357, 31.1k GitHub stars) has published a detailed 500-line design doc on how it keeps long agent sessions usable:
- Compaction: rewrites old conversation history into a summary on the current branch, preserving prior work context without blowing up the token budget.
- Branch summaries: capture context from abandoned branches during /tree navigation.
Both are persisted as session entries and converted back into user-context messages when rebuilding LLM input. The doc maps the full implementation: a snapcompact strategy that archives history as dense bitmap images, provider-native streaming compaction, mechanical content elision (shake), pruning, and an OpenAI-specific compaction path.
A practical reference for anyone building long-session memory and context engineering into coding agents.
More from coding & agent
- Cross-verifying AI math proofs with hundreds of agent calls instead of Lean — DimitrisPapail · 2026-09-15
- Pyrefly 1.3 ships experimental tensor-shape checking for JAX, NumPy and Polars schemas — tdhopper · 2026-09-15
- Codex and Grok Bot share the same flaw: making users do the organizing — jesselyu · 2026-09-15
- Astra writes code humans can no longer read: 'machineslop' and reward hacking — jiqizhixin · 2026-09-15
- Read-only Shopify catalogue MCP server: stdlib-only, one file, with a 183-assertion self-test — PrestigiousAddress47 · 2026-09-15
- BlaBla: executable project memory cuts coding agent handoff cost by 63% vs prose context — KiborgikDEV · 2026-09-15