NewsCrawler.org

billion-context: a plugin that compresses long sessions of coding agents

web session page: cache hit-rate chart + attribution
ranxianglei/billion-context
Image: github.com

billion-context is a context-compression plugin for coding sessions that can run for a month and reach billions of tokens[1]. The project says a 100K context window[2] is enough and that it uses 5× fewer tokens. It sits between any agent and its model API and rewrites Anthropic and OpenAI streams with acp-kernel compression. The model itself decides when and what to compress into summaries, not a hard truncation limit.

The proxy adds four tools: compress folds a message range into a detailed summary, decompress restores a range, search_context searches summaries and visible messages by keyword, and acp_status shows context usage and which ranges can still be compressed. Unlike a host's built-in summarizer, compression is incremental, reversible and keeps the prefix cache[3] intact.

The README says a healthy session keeps a 95–97% prefix-cache hit rate, and that compression itself costs 2% or less. A 4.5-month study reports 174,327 model calls and 18.76 billion cumulative input tokens. In a third-party benchmark of 1,500 items, the plugin ranked first on ContextBench. It is installed with npm install -g billion-context.

Read the original github.com

Sources

  • GitHub Trending

    ranxianglei/billion-context

    710 stars today6,958 stars571 forks

First seen: Читать по-русски

Open as a page