Cap your Claude Code costs.
Keep your agents.
Claude Code loops. Retries cost money. RelayPlane sits in front of Anthropic, caps every request, every agent, every model. Free, local, MIT.
If any of these are you
- You run claude in a terminal and a single session has burned through your daily cap before lunch.
- You set claude -p running on a script and came back to a $30 bill.
- An agent retried the same tool call 3 times, each one cost more than the last.
- You suspect cost runaway and you have no live view of what is being spent right now.
RelayPlane is a local proxy. Point Claude Code at localhost:4100, every request goes through your machine first. Live cost. Per-agent breakdown. Kill switch. Nothing leaves your laptop unless you opt in.
Install in 30 seconds
No account. No login. Free tier covers the local proxy, the cost ticker, and the dashboard.
One command, no install:
npx @relayplane/proxy start
Or install globally:
npm install -g @relayplane/proxy && relayplane start
Proxy listens on localhost:4100. Dashboard is on the same port at /dashboard.
Point Claude Code at it
One environment variable. Claude Code keeps using your existing Pro/Max OAuth or API key. No re-auth. No code changes.
Shell, one line:
export ANTHROPIC_BASE_URL=http://localhost:4100
Make it permanent (~/.bashrc or ~/.zshrc):
echo 'export ANTHROPIC_BASE_URL=http://localhost:4100' >> ~/.bashrc
Confirm it works:
claude -p "say ok" # request shows up in the dashboard live log
Same trick works for Cursor (settings.json), Aider, and any tool that respects ANTHROPIC_BASE_URL. See the Claude Code integration page for tool-specific notes.
Watch every request, live
Open localhost:4100/dashboard or run relayplane watch in another terminal. Per-request cost, per-model spend, per-agent breakdown, no spreadsheet at the end of the month.
REQUESTS · LIVE today $2.41 / $20 cap · 12%
time agent model in/out cost
─────────────────────────────────────────────────────
02:10:33 8ebffbdb sonnet-4-6 105,301/136 $0.034
02:10:29 8ebffbdb sonnet-4-6 105,049/ 84 $0.322
02:10:23 8ebffbdb opus-4-7 143,777/224 $0.147
02:10:19 8ebffbdb opus-4-7 2,089/ 30 $0.002
─────────────────────────────────────────────────────
agent 8ebffbdb retried 3x in 47s, kill switch armed
Captured from relayplane watch on a real Claude Code session. The same agent (8ebffbdb) repeated the same 105K-token prompt, paid Sonnet input tokens four times.
The kill switch is the product
Free gets you the watch and the dashboard. Pro adds the daily cap, the auto-downgrade at 80%, the hard block at 100%, and the stuck-agent kill trigger when an agent retries the same call 3 times in 90 seconds.
relayplane config set budget.dailyCapUSD 20
80% of cap requests silently downgrade to Sonnet
100% of cap requests blocked, agent gets a clear error
3 retries in 90s stuck-agent detector fires, kill switch one-tap
Free. Local. MIT.
Proxy and dashboard are free. Pro unlocks the kill switch trigger, daily cap, and per-agent budget controls.