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:

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.

Original post →

More from coding & agent

coding & agent channel →