{"name":"billion-context: Compress Context for Long Coding-Agent Sessions","description":"billion-context is a TypeScript proxy plugin built on acp-kernel that incrementally compresses coding-agent conversations, aiming to fit month-long sessions into smaller context windows. It supports clients including Claude Code, Codex, OpenCode, pi, and Gemini CLI.","github":"https://github.com/ranxianglei/billion-context","url":"https://osrepos.com/repo/ranxianglei-billion-context","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/ranxianglei-billion-context","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/ranxianglei-billion-context.md","json":"https://osrepos.com/repo/ranxianglei-billion-context.json","topics":["typescript","ai-agents","coding-agent","proxy","context-compression","conversation-summarization"],"keywords":["typescript","ai-agents","coding-agent","proxy","context-compression","conversation-summarization"],"stars":null,"summary":"billion-context is a TypeScript proxy plugin built on acp-kernel that incrementally compresses coding-agent conversations, aiming to fit month-long sessions into smaller context windows. It supports clients including Claude Code, Codex, OpenCode, pi, and Gemini CLI.","content":"## Overview\n\nbillion-context is a TypeScript proxy plugin built on **acp-kernel**, a context-compression library from the same project author. It sits between coding agents and model APIs, compressing conversation history into layered summaries to address context-window growth and token costs during long sessions. The project frames its goal as enabling month-long sessions, billions of tokens processed over time, and roughly five times fewer tokens, while using a context window around 100K tokens.\n\nIt supports a broad range of clients, including Claude Code, Codex, OpenCode, pi, Gemini CLI, and others. Integration options include native client plugins, launchers, and a `/bili/` base-URL proxy route. Compression is model-driven: the model chooses what to summarize, and compressed ranges can be restored when needed.\n\n## Key Features\n\n- Incrementally compresses conversation ranges into detailed summaries rather than applying a fixed truncation limit.\n- Provides `compress`, `decompress`, `search_context`, and `acp_status` context-management tools.\n- Supports native plugin, client launcher, and base-URL proxy integration paths.\n- Rewrites Anthropic- and OpenAI-shaped API streams and forwards requests to compatible model APIs.\n- Includes session tracking, cache-hit reporting, logs, and a local web UI for session and proxy status.\n- Offers Docker deployment as well as npm installation.\n\n## Use Cases\n\n- Coding-agent users who want to keep one conversation going across long projects without repeatedly starting over as context fills.\n- Teams using smaller context windows that want to retain older conversation information through summaries and on-demand restoration.\n- Developers seeking to reduce repeated input tokens in extended agent sessions, with cache reporting to inspect proxy behavior.\n- Operators integrating multiple coding-agent clients through a shared proxy, using the integration method each client supports.\n\n## Our Take\n\nThis is an ambitious, actively changing context-management proxy with broad client coverage, but its reported contributor concentration and early project status merit a cautious trial before relying on it for critical workflows.\n\n**Good fit if:**\n- You use a supported coding-agent client and need longer sessions than its ordinary context handling allows.\n- You can install and operate a Node.js proxy, or prefer the supplied Docker option.\n- You are comfortable evaluating a fast-moving project and checking its session and cache reports during use.\n\n**Look elsewhere if:**\n- Your workflow depends on a stable, slowly changing integration surface; the project is new and changes rapidly.\n- You need a project with clearly established multi-person maintenance, since most contributions currently come from one person.\n- You require a clearly asserted license for the code before adoption; the repository metadata reports no license assertion.\n\n## Project Health\n\n| Signal | Value |\n|---|---|\n| Status | **New**: less than six months old and changing fast |\n| Last commit | 2026-10-22 (today) |\n| Commits, last 90 days | 100+ |\n| Releases, last 12 months | 100+ (latest v0.1.204, 2026-10-21) |\n| Contributors | 50 (top contributor: 93% of commits) |\n| Issues closed, last 90 days | 45+ (typically closed in 0 days) |\n| Pull requests merged, last 90 days | 70 (typically merged in 0 days) |\n| Project age | 3 months |\n\nChecked on 2026-10-22 with the GitHub API.\n\n## Project Facts\n\n- Language: TypeScript\n- Stars: 2.3k\n- Forks: 198\n- Topics: dsh-plugin\n- Archived: no\n\n## What You Need\n\nDetected in the repository:\n\n- Node.js >=20 (from package.json)\n- A Dockerfile, so it can run in a container\n- A test suite and automated checks on GitHub Actions\n\n## Getting Started\n\nInstall the CLI with npm:\n\n```bash\nnpm install -g billion-context --prefix=~/.local\n```\n\nThen try a client launcher such as `bili claude`, or see the README for native plugin setup, other clients, configuration, and Docker instructions.\n\n## License in Plain Words\n\nNo standard license was detected. Without a license, the default copyright rules apply: you may read the code, but not reuse it. Check the repository or ask the authors.\n\n## Alternatives\n\n- [tooltrim](https://osrepos.com/repo/nac7-tooltrim): tooltrim extracts or retrieves relevant parts of large tool results, while billion-context incrementally compresses coding-agent conversations.\n\n| Project | Language | License | Stars | Status |\n|---|---|---|---|---|\n| **billion-context** | TypeScript | – | 2.3k | New |\n| [tooltrim](https://osrepos.com/repo/nac7-tooltrim) | Python | MIT | 3 | New |\n\n## Considerations\n\n- The project is marked **New** and is changing quickly, with very frequent recent commits and releases. Its measured contributor activity is highly concentrated in one person, which may affect continuity and review capacity.\n- The package requires Node.js 20 or later. Docker is available, but the README advises using a Node 24 base for its container setup.\n- The repository license metadata is `NOASSERTION`. The README specifically identifies the paper as MIT-licensed, but that does not establish the license for the whole codebase; verify the applicable terms before adopting or redistributing the software.\n- The proxy can expose an unauthenticated service when configured to listen beyond loopback. The README advises restricting such access to a trusted network.\n- The project describes compression as model-driven and incremental. Its stated token savings and session scale are project claims, not independent guarantees for every client, model, or workload.","metrics":{"detailViews":1,"githubClicks":0},"dates":{"published":null,"modified":"2026-10-22T02:55:36.000Z"}}