What you'll get

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


What you need


Step 1: Install it

macOS / Linux:

npm install -g billion-context --prefix=~/.local

Windows: npm install -g billion-context


Step 2: Start your agent through it

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>.


Step 3: Check it runs

curl -s http://localhost:8787/__bili/health