Billion Context is an open-source context-compression plugin for AI coding agents, with more than 4,800 stars on GitHub. It sits between your coding agent and its model API and keeps a single session alive for days or even a whole month — billions of tokens through one context window — while cutting token use by up to five times.
Long coding sessions blow up context: every token costs money, and once the window fills up the session degrades or dies. Billion Context runs a proxy that rewrites the agent’s Anthropic or OpenAI API streams and applies model-driven incremental compression. The model itself decides when and what to fold into high-fidelity summaries. Compression is incremental, reversible, and prefix-cache friendly: a healthy session keeps a 95–97% cache hit rate. One npm install covers more than twenty agent clients — Claude Code, Codex, Cursor, Pi, OpenCode, Gemini CLI, Qwen Code, Kimi, and more — via the bili launcher or a native plugin install.
Billion Context is completely free and open source under the MIT license, with a single attribution requirement. You install it with npm, run it locally, and there is no paid tier or account.
Billion Context is for developers who run long AI coding sessions and are tired of losing context — or paying for it. It suits anyone working on large codebases with Claude Code, Codex, or Cursor, teams keeping marathon sessions alive across days, and builders who want smaller windows to do bigger jobs.