billion-context is a free, open-source plugin that sits between your coding agent and the model. It folds older parts of the conversation into short summaries, and the model itself decides when and what to fold. It can unfold any piece again when it needs the exact details back, so nothing gets cut off. Works with Claude Code, Codex, Aider and other agents.
Repo: github.com/ranxianglei/billion-context
macOS / Linux:
npm install -g billion-context --prefix=~/.local
Windows: npm install -g billion-context
bili claude # Claude Code
bili codex # Codex
bili aider # Aider
Claude Code native plugin instead: bili plugin install claude, then restart Claude Code.
Other tools: run bili and point the tool's base URL to http://localhost:8787/bili/<the original API URL>.
curl -s http://localhost:8787/__bili/health