Enable months-long coding sessions within a 100K token context window
Long coding tasks often accumulate conversation history that exceeds model memory limits. This tool compresses used conversations into summaries, allowing work on a scale of billions of tokens to continue within a small 100K token window. The model decides when and what to compress, and you can revert to the original content when needed to avoid losing important context.
Model-driven progressive compression
The tool sits between the agent and the model API to mediate communication. It is designed so that the model calls the compression tool itself when the context fills up, rather than simply cutting out old messages. Compressed sections are replaced with detailed summaries, which can be restored to the original if specific details are required. This approach manages the context window efficiently while maintaining prompt cache efficiency.
Independent benchmarks and long-term operation data
In independent benchmarks, the tool showed higher accuracy than existing RAG methods. In an evaluation of 1,500 items, it recorded an F1 score of 0.3097 on the ContextBench standard while reducing costs by 58.3% compared to the full context. On LongMemEval-S, it scored 16.6% higher than the top RAG methods.
Client-specific integration methods
It supports various coding clients such as pi, opencode, dsh, kimi, and hermes. Installing it as a native plugin adds an entry to the client configuration file, allowing you to maintain existing usage habits. Alternatively, running the launcher with the bili command starts the proxy and client together, requiring no separate configuration. Some clients can be integrated by simply changing the URL prefix, offering high versatility.
Installation and initial setup
On Linux and macOS, install it using the npm install -g billion-context --prefix=~/.local command. This method does not require sudo privileges, and the bili command is created in ~/.local/bin. On Windows, the default npm global path is user-writable, so you can install it with npm install -g billion-context.
Pre-use checks
The tool is written in TypeScript and requires a Node.js environment. The native plugin mode and the existing standalone extension cannot be used simultaneously; to prevent double compression, existing settings are backed up during installation. The Code tab in Claude Desktop currently does not support proxy routing, so the compression feature is not applied. Some clients lack a plugin connection point and only support the launcher method, so you should verify the support method for your intended client in advance.