This is an early release preview. You may encounter bugs.
View as agent
Tool
Claude Rolling Context logo
Unclaimed

development

Claude Rolling Context

A proxy plugin that rolls context compression past 100K tokens.

C 54/100 GitHub score ? This grade is derived from GitHub signals — not user votes. Open for the full breakdown.
No votes yet

01 / About

About Claude Rolling Context.

Rolling Context sits between Claude Code and the Anthropic API as a transparent local proxy that manages the context window automatically. Rather than compacting the whole conversation at once, it keeps recent messages verbatim and summarizes only older ones once the context passes a token threshold (100K by default), so a long session can continue without hitting the context limit. It uses the existing Claude Code authentication and requires no API key, and runs on pure Python standard library.

The tool contrasts itself with Claude Code's built-in /compact, which replaces the entire conversation with a lossy summary and, over repeated runs, ends up summarizing a summary. Here, each compression cycle merges the previous summary with newly aged-out messages into a rolling timeline while the newest ~40K tokens stay untouched, and summarization runs in the background so it does not block requests. The original JSONL transcripts are left unmodified.

The proxy is stateless: it hashes message content, stores the compressed result keyed by those hashes, and swaps in the compressed version when a matching request arrives. This lets multiple conversations, subagents, and branches work without session tracking, and the proxy can be restarted at any time. It can also chain in front of another proxy (model router or API gateway) by treating an existing base URL as its upstream.

Behavior is tuned through optional environment variables, including the trigger token count, the number of recent tokens kept verbatim, the summarization model, the listen port, and upstream/custom-summarizer endpoints. The generated summary is structured into sections such as active goal, previous goals, a numbered timeline of changes and decisions, current state, and key details, and health and debug endpoints expose compression stats and stored summaries.

02 / Discussion CREDIBILITY-GATED

Discussion · 0

Reading is open to everyone. Only verified humans or builders at GitHub B+ can post or vote — every thread carries its author's credibility.

  • No discussions yet — start the first thread.

04 / Build

Build with Claude Rolling Context.

Browse the catalogue for frameworks, tools, and blueprints — each scored on real GitHub credibility.

Browse the catalogue