See what Claude carries. Kill what you don't need. Control what it can do.
Iris runs locally between Claude Code and Anthropic. It shows what Claude Code sends with each request, identifies tool schemas taking up context, lets you remove the ones you don't use, and applies Guard rules before tools execute.
5,149 of those tokens are the fixed prefix — the system prompt plus every tool schema, re-sent on every single turn of the session. Your own question is the tail end of that last slice. In this capture half the payload was tool definitions, and the model called almost none of them.
Iris opens in your browser at 127.0.0.1:8787 while Claude Code runs as usual in your
terminal. Every request Claude Code makes passes through it first, so everything below is your own
traffic — four questions you cannot answer from the chat window.
Claude Code needs tool definitions in context so the model knows how to use them. That also means tools you never call can still occupy context on every request. Iris shows you which schemas are there, how large they are, and whether they are actually being used.
Both figures come from Claude Code's own /context command on one setup — same project,
same eight-message conversation, with only the tool schemas changed between the two captures. It is
one measured setup, not a promised saving: what you can recover depends on which tools and MCP
servers you have enabled, and how many of them you actually use. Iris is built to measure
your configuration rather than to repeat this number.
Token counts start as chars/4 and are then calibrated against the measured input total
that Anthropic returns, so the figures track what you were actually billed.
Read the Token Tax research
Iris keeps track of the tool schemas Claude Code sends and whether those tools are actually called. If an optional tool keeps consuming context without being used, you can turn it off and review the change before publishing.
{
"permissions": {
"deny": ["NotebookEdit"]
}
}
Read, Edit
and Bash cannot do the job — use Guard for that instead.
Optimize decides what Claude can see. Guard decides what it can do. Claude may
legitimately need a tool in context while still needing restrictions on how it is used — removing
Bash from the payload is the wrong answer to "don't touch production".
$PROJECTALLOWrm -rf ./build, irreversible effectsASKGuard does not match on command text. It compiles the tool call into a structured effect — what it deletes, which service, which environment, whether it is reversible — and evaluates that against an authority envelope stored outside the conversation. The hook never asks a model; it is deterministic code.
// what does this actually DO?
{ effect: "delete", resourceType: "cloud",
service: "aws", environment: "production",
destructive: true, reversible: false,
unknown: false }
Guard is not a sandbox. Arbitrary shell commands cannot always be understood safely. Unknown operations can require confirmation, and Guard should not be the only boundary protecting irreversible infrastructure.
Flight Recorder shows what Claude actually invoked during the session and the Guard decision attached to it.
Context, Optimize and Flight Recorder are one story told in order: Iris measures what went out, shows which of it was never used, and records what Claude was allowed to do with the rest.
Iris runs locally and binds to 127.0.0.1. Claude Code sends its model requests
through Iris, which forwards them to Anthropic.
Requires Node 18+, Claude Code, and an Anthropic account Claude Code can already use.
Leave this terminal running. It is both the proxy and the dashboard, and Claude Code reaches the API through it while you work.
From the Claude Code project that has a .claude/ directory.
Open http://127.0.0.1:8787, restart Claude Code so it picks up the new settings, then use Claude the way you already do. Come back after a few turns and read Context, Optimize and Guard.
The things people ask before putting a proxy in front of their model traffic.
No. Iris binds to 127.0.0.1 and runs entirely on your machine. It forwards requests to Anthropic byte-for-byte unless you explicitly enable wire redaction, and it makes no model calls of its own. There is no account, no telemetry and no remote component.
One measured setup went from a 28,000-token baseline to 5,600 — a reduction of 22,400 tokens on every turn. That is one measurement, not a promise. How much you can recover depends on which tools and MCP servers you have enabled and how many you actually use, which is what Iris measures for your own configuration.
It adds one local proxy hop on the same machine. Guard runs as a Claude Code hook and is deterministic code rather than a model call, so a policy decision costs no tokens and no round trip to an API.
Claude Code cannot reach the API, because iris init points ANTHROPIC_BASE_URL at localhost. Start Iris and it works again, or remove that variable from .claude/settings.json to go back to talking to Anthropic directly.
No. Guard evaluates tool calls before Claude Code executes them, and it is strongest on filesystem scope and production access. It does not confine a process or restrict syscalls, and it should not be the only boundary between an agent and irreversible infrastructure.
Yes. MCP tool schemas arrive in the same tools array as built-in tools, so Iris sizes them, counts their calls, and can remove them from context the same way. For many setups an unused MCP server is the single largest block of wasted schema.
It can, which is why core tools sit behind an explicit unlock. An agent without Read, Edit and Bash cannot do the work. Removing a tool is fully reversible: toggle it back on and publish, or delete its entry from permissions.deny, then restart Claude Code.
No. Iris is MIT licensed and free, with no account and no paid tier. It has zero runtime dependencies and runs on Node 18 or newer.
Yes. One instance serves one project. Start a second instance in another project and it finds a free port, then re-points that project's settings at the port it actually bound.