v1.6.15 · MIT licensed 1,317 tests passing

Sip your tokens.
Don't gulp them.

Keep Claude Code's context clean for sharper answers and lower cost, automatically.

Star on GitHub
1,317 tests passing
git diff −94% cache reuse 90% −2,400 tok
Bloated. I'm losing the thread of your task.
before sipcode after sipcode
tokens / turn 1,050
62.6%median tokens saved
15MCP tools
0network calls
MITopen source

measured from your transcripts, not a brochure number.

The hidden cost cited from research

Your bill isn't the only thing context rot costs.

Same task, same model. Watch what bloated context does.

User asks for A sign-out button on the navbar.
Turn 5 context
8K of 200K tokens
You

Add a sign-out button to the navbar.

Claude

Adding a SignOutButton to src/NavBar.tsx, wired to the existing useSession() hook. Diff below.

Sharp. Specific. Right answer first try.
Turn 47 context
187K of 200K tokens
You

Add a sign-out button to the navbar.

Claude

There are a few places this could live. Earlier you mentioned a sidebar, but the project also has a top nav. Should I add it to both? I also want to double-check the session hook still exists.

Hedges. Asks. Forgets context you already gave.
Anthropic research
0%

sharper outcomes when context stays lean. About 40% fewer agent errors under the same conditions.

Cited from published research. Not measured by Sipcode.

arxiv.org
LOCA-bench: language agents under controllable and extreme context growth

Answer quality drops measurably as input tokens climb. Even on tasks the same model aced at small context sizes.

arXiv 2602.07962
Our three-part answer one toolkit · three layers

One install. Three layers of defense.

LAYER 01 · VALVE

Trim before context fills up.

A hook rewrites bulky commands to their compact form before Claude ever sees them.

sipcode proxy --install automatic · zero config
live token rewrites −62.6% median
git status
−85%
git log
−80%
git diff
−94%
LAYER 02 · METER

Measure what the cleaning earned.

Reads your local Claude transcripts. Tells you where tokens went and what you saved.

sipcode why · impact · stats 15 MCP tools · zero network calls
sipcode why · last session
$ sipcode why
output ratio: 0.6%
duplicate reads: 12,400 tok $3.72
idle context: 22,100 tok $6.63
recoverable: ~34,500 tok ($10.35)
LAYER 03 · DRIFT

Catch context rot before it spreads.

Silent unless your latest session drifts off your baseline. Names what moved and how to fix it.

sipcode drift silent unless it matters
Context drift detected just now
Tokens per turn up 662%
norm
1,050 8,000
→ Fix: Start a fresh chat to reset the context.
Before and after measured by sipcode

Six commands.
The same answer, fewer tokens.

Command
0 5k 10k 15k 20k
Before → After · Saved
git status
git
200 30
−85%
git log
git
2,500 500
−80%
git diff
git
21,500 1,260
−94%
grep -r
recursive shell
12,000 2,400
−80%
Grep
native tool
10,000 2,000
−80%
Glob
native tool
4,500 1,500
−67%
62.6% median across a locked 20-task corpus. Reproduce in 90 seconds with npx sipcode benchmark
See the benchmark methodology
sipcode drift — session report watching
Context drift detected in your latest Claude Code session

What this means: your newest session is behaving differently from your recent norm, in ways that waste tokens and can make Claude less reliable.

(This is "context rot": answer quality drops as context gets bloated.)

Signals that regressed (2):

Tokens per turn · up 662%
your norm: 1,050 this session: 8,000
norm

Each step is sending far more context than your norm. Bloated context costs more tokens and can bury the detail Claude needs.

→ Fix: Start a fresh chat for your next task to reset the context.

Cache reuse · down 90 points
your norm: 90% this session: 0%
norm

Much less of your context is being reused from cache (about 10x cheaper).

→ Fix: Avoid changing MCP servers or config mid-task.

Measured against the median of your last 6 sessions.
Conservative by design: silent unless something really moved.
Get running in under a minute node 20+ · macOS · linux · windows

Two surfaces. Same toolkit.

Claude Code terminal

Install the package, then turn on the proxy hook.

$ npm install -g sipcode
$ sipcode proxy --install

Restart Claude Code. You are done.

Claude Desktop chat

Add the MCP server to your config, then restart Desktop.

{
  "mcpServers": {
    "sipcode": { "command": "npx", "args": ["-y", "sipcode-mcp"] }
  }
}

After restart, ask Claude "what sipcode tools do you have?" to confirm.

The npm route is what we ship. No curl | sh, no one-click installer that does nothing.

What we won't pretend stated limits · CI-enforced

Sipcode does not do these things.

Optimize Claude Desktop chat itself.

The Desktop pipeline is closed. The proxy only works in Claude Code. Desktop gets the analytics tools.

Change anything until you turn it on.

npm install -g sipcode puts the package on your machine. Tokens drop after you run sipcode proxy --install.

Claim Claude got smarter.

The 29% and 40% reliability numbers come from published research, cited not measured. We measure the tokens we save.

Phone home.

No telemetry. No network calls in any core path. A CI guard fails the build if that ever changes.

Honest answers six questions, no spin

Questions people actually ask.

What is Sipcode?

An open-source toolkit that keeps Claude Code's context clean. It rewrites bulky tool calls before they run (the proxy), measures what got saved (the meter), and warns you when a session starts to drift from your baseline (the drift detector). Newer features layered on top: re-read dedup that refuses to reload files Claude already has, integrity scoring that tells you how much signal a rewrite kept, and AST-aware reads that return only the symbol Claude searched for. MIT licensed.

Can I ask Sipcode questions in Claude Desktop?

Yes. Sipcode ships 15 MCP tools. Ask "how am I doing today?" and Claude routes to get_today_summary — spend so far plus comparison against your adaptive 30/14/7/3 day median. Ask "how much will I spend this month?" and it routes to forecast_monthly_spend — projected month-end with a confidence band. No SDK, no account, no telemetry; Sipcode reads the local .jsonl files Claude Code already writes.

How is it different from RTK?

Sipcode covers terminal use through Claude Code and chat use through Claude Desktop via 15 MCP tools. RTK is terminal only. Beyond coverage, Sipcode adds reliability infrastructure RTK does not have: a drift detector that catches context rot live, re-read dedup that refuses to reload files already in context, integrity scoring that tells you how much signal a rewrite kept, and AST-aware reads that return only the symbol the model searched for. You can use both. They do not conflict.

How much will it actually save me?

The reproducible benchmark shows a 62.6 percent median. Your number will depend on your workload. After install, sipcode proxy --stats shows the exact tokens rewritten on your machine.

Does it change Claude's answer quality?

Research shows leaner context lifts agent reliability. We cite that research. Sipcode measures the tokens it saves, not the quality lift, so we do not put a number on the quality side. You will judge for yourself.

Is it free?

Yes. MIT licensed. No account. No telemetry. No paid tier.

Why "sip, don't gulp"?

A gulp is a context dumped into Claude without restraint. It costs more and makes the model worse. A sip is the same information, measured. Sipcode keeps the intake at a sip.

Sip your tokens

Stop gulping them.

Runs locally. No account. No telemetry. About 60 seconds to set up.