# Sipcode — Token optimisation for AI coding agents

Sip your tokens. Don’t gulp them.

By Anuj Ojha. Status: Live · open source. Page: https://anujojha.com/work/sipcode/

## What it is

Sipcode keeps Claude Code’s context clean. It is an open-source toolkit that measures how much of an AI coding agent’s context is bloat, then removes the parts the agent does not need, before they cost you tokens.

## The problem

When the context window fills up with stale, repeated or off-topic output, the answers get worse and every turn costs more, and you cannot tell what is bloat and what is signal.

## How it works

A live hook sits in front of Claude Code’s tools. It trims verbose tool output and drops repeat reads of files the agent has already seen in the same session. Code is read AST-aware through tree-sitter, the project summary it injects can be hard-capped at 2,000 tokens, and sipcode drift shows how much of a session was waste. It also runs as an MCP server with 16 tools. It makes zero network calls: a test fails the build if network code is ever imported.

## The proof

A 62.6% median saving on a locked 20-task corpus that anyone can rerun with sipcode benchmark. The corpus is synthetic, scripted pairs of Claude Code transcripts rather than recordings of live sessions, so it models what the mechanisms remove; sipcode impact measures your own sessions. 2,222 tests pass.

## Where it is now

Live and open source at v1.7.3, with more than 10,000 npm downloads, a listing on the official MCP Registry and #12 Product of the Day on Product Hunt. It also reads OpenAI Codex session logs for spend analytics, and ships a companion, Sipcode Score: a GitHub Action that grades how agent-friendly a repository is on every pull request.

## Numbers

- 62.6%: median savings on a locked, synthetic 20-task benchmark anyone can rerun
- #12: Product Hunt daily rank · 143 points
- 2,222: tests passing
- 10,000+: npm downloads · listed on the official MCP Registry
- v1.7.3: current release · 16 tools on its MCP server

## Said plainly

- 62.6%, modelled: the benchmark runs on scripted Claude Code transcripts, not recordings of live sessions; your own number depends on your workload
- ~29% quality lift: attributed to Anthropic’s published research, NOT measured here — it is their figure, quoted as theirs

Stack: TypeScript · Node · tree-sitter · Vitest · Satori · Commander · zod

## Questions

**What is Sipcode?**
An open-source toolkit that keeps Claude Code's context clean. It measures how much of a coding agent's context is bloat, then trims verbose tool output and drops repeat reads of files the agent has already seen, before they cost tokens.

**How much does Sipcode save?**
A 62.6% median saving on a locked 20-task benchmark that anyone can rerun with sipcode benchmark. The corpus is synthetic, scripted Claude Code transcripts rather than live sessions, so your own number depends on your workload; sipcode impact measures your real sessions.

**Does Sipcode send my code anywhere?**
No. It makes zero network calls, and a test fails the build if network code is ever imported.

**Which coding agents does it support?**
Claude Code: a live hook sits in front of its tools, and it also runs as a 16-tool MCP server. It reads OpenAI Codex session logs too, for spend analytics.

**Is Sipcode free?**
Yes. It is open source and installs from npm.

Links: [Site](https://anuj7411.github.io/sipcode/), [Repo](https://github.com/Anuj7411/sipcode), [npm](https://www.npmjs.com/package/sipcode)
