billion-context

github.com

A proxy between a coding agent and its model API summarizes older messages in stages.

Pricing
Free
Published
Oct 27, 2026

Next steps

What it does

billion-context is a source-available proxy published on GitHub that sits between any coding agent (Claude Code, Codex, Cursor, Aider and others) and its model API. You point the agent's base URL at it; it parses Anthropic- or OpenAI-style requests, applies acp-kernel compression and injects context-management tools such as compress, so the model itself decides when and what to fold into high-fidelity layered summaries. Compression is incremental, reversible (ranges can be decompressed on demand) and prefix-cache friendly, with a healthy session keeping a 95-97% cache hit rate. The author reports a 4.5-month production study across three hosts with 174,327 model calls, 18.76B cumulative input tokens and zero context-window violations on 204,800-token models, with an accompanying open preprint. Install with npm install -g billion-context.

The agent can search summaries and restore a passage when it needs detail.

Context-compression proxy for coding agents that keeps month-long single sessions running in 100K-token windows with about 5x fewer tokens.

Use cases

  • Keep a Claude Code session alive for weeks without hitting the context limit
  • Cut token costs on long coding-agent sessions
  • Run long sessions on models with small context windows

Frequently asked questions

Where does the proxy sit?
It processes requests sent by the coding agent to the model API.
How does an agent recover an earlier detail?
It can search the summaries and decompress a selected range to recover the original conversation.
Log in to join the discussion