v1.7.5 · MIT licensed 2,409 tests passing

Sip your tokens.
Don't gulp them.

A free, open-source (MIT) command-line tool that reads your local Claude Code and OpenAI Codex logs and shows where your tokens and usage limits go.

Zero network calls. Nothing leaves your laptop.

Star on GitHub
2,409 tests passing

Launched on Product Hunt on Tuesday, June 23, 2026. Finished around #12 of 1,086 products that day (134 points, 28 comments).

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
2agents read: Claude Code and Codex
62.6%median saved on a synthetic benchmark
0network calls
MITopen source

62.6% is the Claude Code proxy on a locked, synthetic 20-task corpus. Your own numbers come from your own logs.

The hidden cost why sipcode exists

Coding agents spend tokens you never see.

Every request re-sends the conversation so far. Files get read again. Idle context rides along. Usage limits change quietly, and an update can make things worse. Sipcode makes all of it visible from your own logs, with numbers checked against an independent counter that shares no code with it.

Bloated context costs quality too. Same task, same model:

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. Claude Code only: Codex setup (rules, proxy) is not supported yet.

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

See where every token went.

Reads your local Claude Code and Codex logs. stats, today, forecast, trend and impact show one section per tool; why and receipt take your newest session from either. --agent codex or --agent claude-code picks one tool.

sipcode stats · why · today claude code + codex · 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 Claude Code or Codex 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.
For OpenAI Codex limits · regressions · plugin

How close is your Codex limit? Your logs already know.

Codex writes your plan's usage-limit readings into its own logs. Sipcode reads them, and the rest of your Codex history, on your machine. For Codex it only reads: it does not change what Codex does.

sipcode limits

When you run out, what used it, and whether 1% got smaller.

  • Each limit window (5-hour, weekly, 30-day): percent used, reset time, and when it runs out at your current pace.
  • What used it: your top sessions and projects in the current period.
  • A possible limit cut check: how many tokens 1% bought in each finished period, on the same model. A period that bought at most half the median of the earlier ones is flagged, always as "possible": limits are account-wide, and Codex use on your other devices or in the cloud looks the same in these logs.

On the maintainer's machine, 1% of the weekly limit bought about 425K tokens (week of Mar 28), 357K (Apr 1), then 77K (week of Apr 13): about 5x fewer. Sipcode flags that as a possible limit cut, not a proven one.

sipcode limits · one machine's logs
$ sipcode limits --since all
Tokens per 1% of your weekly limit (gpt-5.4)
Mar 28: 425K   Apr 1: 357K   Apr 13: 77K
Possible limit cut around Apr 13: 5.1x fewer tokens per 1%.
Limits cover your whole account. Codex use on other devices or in the cloud is not in these logs and can look like a cut.
sipcode regress

Did an update make things worse?

Checks your own Claude Code and Codex logs and pins each finding to the version that brought it, comparing every version with your other versions: prompt-cache misses, cache written with a 5-minute lifetime instead of 1 hour, large uncached input after tool results, the whole cache rebuilt about every hour, and a Codex version using more of your limit per token.

--bug-report adds a block to paste into a GitHub issue: token counts, versions, dates and short session ids only. No message text.

codex plugin

Ask Codex in plain words.

  • "How much did I spend on Codex this month?"
  • "How close am I to my limit? Did it shrink?"
  • "Why was my last session so expensive?"
  • "Did it get worse after an update?"

Works in the ChatGPT desktop app and the Codex CLI. It runs the sipcode command on your computer: no hooks, no MCP server, no network calls. Setup below.

Before and after claude code proxy · 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 on a locked, synthetic 20-task corpus (scripted transcripts, not live sessions). 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

Four ways in. Same local logs.

Terminal claude code + codex

Install the package, then read your logs.

$ npm i -g sipcode
$ sipcode stats
$ sipcode limits
$ sipcode why

Node.js 20 or newer. Reading the logs Codex compresses (.jsonl.zst) needs Node.js 22.15 or newer. sipcode limits is Codex only.

Codex plugin chatgpt app · codex cli

After npm i -g sipcode, add the plugin. npx runs the Codex CLI for you, so you do not need it installed.

$ npx -y @openai/codex plugin marketplace add Anuj7411/sipcode
$ npx -y @openai/codex plugin add sipcode@sipcode

Restart the ChatGPT desktop app, then ask in a new chat: "how close am I to my Codex limit?"

Claude Code proxy optional

Turn on the hook that trims bulky commands before Claude sees them.

$ sipcode proxy --install

Restart Claude Code. This part is Claude Code only: Codex setup (rules, proxy) is not supported yet.

Claude Desktop chat

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

{
  "mcpServers": {
    "sipcode": { "command": "npx", "args": ["-y", "-p", "sipcode", "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 what Codex does.

For Codex, Sipcode reads the logs: spend, usage limits, regressions. Codex setup (rules, proxy) is not supported yet.

Hide its own mistakes.

Sipcode once over-counted Claude Code tokens by 11.4% on one machine: resumed sessions copy earlier requests, and both copies were summed. Fixed in 1.7.0. An independent counter that shares no code with Sipcode cross-checks every period command against the same logs.

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 eleven questions, no spin

Questions people actually ask.

What is Sipcode?

A free, open-source (MIT) command-line tool that reads your local Claude Code and OpenAI Codex logs and shows where your tokens and usage limits go: spend per day and month, the largest requests in a session, drift from your own baseline, Codex usage limits, and regressions after an update. For Claude Code it can also act: a proxy hook trims bulky tool output before it reaches the model, re-read dedup refuses to reload files Claude already has, and AST-aware reads return only the symbol Claude searched for. Zero network calls.

Does it work with Codex?

Yes, for reading. stats, today, forecast, why, drift, trend, impact and receipt read Codex logs next to Claude Code's; add --agent codex or --agent claude-code for one tool. sipcode limits shows your Codex usage limits, sipcode regress checks whether an update made things worse, and the Codex plugin lets you ask Codex about all of it in plain words. Codex setup (rules, proxy) is not supported yet, so Sipcode does not change what Codex does.

Does it send my code anywhere?

No. Sipcode makes zero network calls during normal use and reads only files on your machine. A privacy test fails the build if network code is imported into the source. To make repeat runs fast it keeps small caches under ~/.sipcode/ (token counts, models, timestamps). They never hold message text and are never uploaded.

What does "possible limit cut" mean?

sipcode limits counts how many tokens 1% of a Codex limit bought in each finished period, comparing periods on the same model. When a period bought at most half the median of at least two earlier periods, it is flagged as a possible limit cut. It always says "possible": limits are account-wide, and Codex use on your other devices or in the cloud raises the percent without leaving tokens in your local logs, which looks the same. On the maintainer's machine, 1% of the weekly limit bought about 425K tokens (week of Mar 28), 357K (Apr 1), then 77K (week of Apr 13): about 5x fewer, flagged as possible.

Do I need the Codex CLI for the plugin?

No. Install Sipcode once with npm i -g sipcode, then run npx -y @openai/codex plugin marketplace add Anuj7411/sipcode and npx -y @openai/codex plugin add sipcode@sipcode. npx runs OpenAI's Codex CLI without installing it. Restart the ChatGPT desktop app and ask in a new chat. If you already have the Codex CLI, run the same two commands with codex in place of npx -y @openai/codex.

Can I ask Sipcode questions in Claude Desktop?

Yes. Sipcode ships 16 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 16 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?

For the Claude Code proxy, the reproducible benchmark shows a 62.6 percent median. Its 20 tasks are synthetic, scripted transcripts rather than live sessions, so 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.

Reads your Claude Code and Codex logs on your machine. No account. No telemetry. About 60 seconds to set up.