[FEATURE] Community proxy that adds persistent memory, smart compaction, cache keepalive and token optimization to Claude Code
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [ ] This is a single feature request (not multiple features)
Problem Statement
Problem Statement
Claude Code has several limitations that compound each other during
real development work:
- No memory between sessions — every time you close the terminal,
Claude forgets your stack, your decisions, your conventions.
You re-explain everything from scratch every session.
- Blind compaction — context compaction fires at a fixed percentage
and summarizes everything into a lossy blob. Schema decisions,
variable names, architectural rationale get dropped. Post-compaction
Claude contradicts its own prior choices.
- Token bloat — Claude Code sends approximately 55,000 tokens of tool
definitions on every request regardless of what the turn needs.
- Duplicate requests — Claude Code fires 2-5 identical background
requests every turn. Every one hits the API.
- Cache expiry — Anthropic drops the prompt cache after 5 minutes of
inactivity. Long pauses mean you start cold on the next turn.
Proposed Solution
cc-memory is a local Docker proxy that sits between Claude Code and
the Anthropic API. It intercepts every request and handles all of the
above before anything reaches Anthropic.
- Persistent memory — project context stored in ChromaDB and SQLite.
Relevant memory injected automatically on every new session. Claude
knows your stack, your decisions, your file structure when you come back.
- Smart compaction — adaptive threshold that adjusts based on content
density. Decision-heavy turns preserved longer. Recoverable tool
outputs evicted first. Compaction only fires when it actually makes sense.
- Tool token filtering — 55,000 tokens of tool definitions reduced to
approximately 2,400. Only what the current turn needs.
- Deduplication — duplicate background requests intercepted and replayed
from cache before they reach the API.
- Keepalive — pings Anthropic every 55 minutes to keep the prompt cache
warm so you never start cold mid-session.
- Context compression — long sessions summarized via free Cerebras calls
before hitting Anthropic. No token cost from your subscription.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
MCP server integration
Use Case Example
A developer working on a multi-file project across multiple days.
Day 1: Claude learns the stack, the database schema, the conventions.
Day 2: new session, Claude already knows everything. No re-explaining.
No re-reading files. No contradicting yesterday's decisions.
The session starts exactly where the last one ended.
Additional Context
Built entirely using Claude Code over 60+ hours of development.
cc-memory was running throughout — Claude remembered every architectural
decision and every file across the entire project while building it.
Free, open source, runs fully local via Docker.
Your API key never leaves your machine.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗