Know the cost first.
Pitstop pauses your AI agent before it overspends, shows how far along it is and what finishing will likely cost, then lets you continue or stop without losing work.
go install github.com/ShadowIzzHerZ/agent-spend-firewall/cmd/pitstop@latestAI gains, until the bill lands.
NET GAIN FROM AI · daily, in thousands of dollars Illustration with made-up numbers. Not a real company or real data.Run paused: won't fit
- Progress
- 5 of 8 steps
- Spent
- $7.10 of $10
- Likely to finish
- $4.20 – $8.40 more
- Confidence
- medium
- Loop risk
- none seen
No answer in 9 minutes means stop. Never auto-continue.
Your agents ship work. The gains add up.
AI gains Without Pitstop With Pitstop
How a run goes
One command in front of the agent you already use.
First, it meters every call.
Then it reads the plan.
It pauses when it won't fit.
You choose. Nothing is lost.
What Pitstop never keeps
It sits between your agent and the provider, so it sees every call. It keeps only what it needs to count money.
- Your API key passes through to the provider and is never written down.
- Prompts and code are forwarded, not stored. The ledger holds model, tokens, cost, time and tool names.
- It listens on 127.0.0.1 only, and its control API refuses requests from web pages.
- An Anthropic key only ever goes to Anthropic, and an OpenAI key only to OpenAI.
- The whole thing is open source under Apache-2.0, so you can read every line.
Built around the pause
Everything else is the base that makes the pause trustworthy.
What one stuck loop costs
Set it to your agent and see what a loop costs when nobody is watching, and what it costs when Pitstop stops it at the fifth repeat.
Prices per million input / output tokens, from the providers' pages on 24 Nov 2026. Assumes every call re-sends the full context at the normal input price and writes 1,000 output tokens. Prompt caching would lower both numbers.
A cap stops. Pitstop asks.
| Provider spend limit | A plain budget cap | Pitstop | |
|---|---|---|---|
| Limit per task | No, per workspace or month | Yes | Yes, plus day and month |
| Checks before the call is sent | No | Depends on the tool | Yes, worst case reserved first |
| Knows how far the task got | No | No | Yes, from the agent's plan |
| Says what finishing will cost | No | No | Yes, a likely range |
| Lets you continue on the spot | No | No | Yes, one click |
| Keeps the work when it stops | No | No | Yes, on a WIP branch |
| Catches loops | No | No | Yes, at five repeats |
Free, and it stays free
The local core is open source under Apache-2.0. It runs on your machine, as one binary, with no account.
- Proxy for Anthropic and OpenAI-style APIs
- Caps, loop stops and the decision card
- Checkpoint, resume and the local dashboard
- Every future local feature
A hosted Team plan, with shared runs and approvals for leads, is planned from $99 a month. It is not available yet.
Fair questions
Which agents does it work with?
Anything that takes a base URL for Anthropic or OpenAI-style APIs: Claude Code with an API key, Codex CLI, Aider, Cline and your own SDK agents. Start them with pitstop run -- <command>.
Does it see my code or keys?
Keys pass through to the provider and are never written to disk. Prompts and code are never stored. The ledger keeps metadata only: tokens, cost, model, time and tool names.
What if nobody answers the card?
After 9 minutes the run stops and your work is saved to a WIP branch. Pitstop never continues on its own.
How good is the forecast?
Remaining cost is steps left times the average cost per step so far, adjusted for growing context. It is labelled low confidence until 3 steps are done, and every forecast is scored against what really happened.
Is it for ChatGPT or Claude.ai plans?
No. Flat monthly plans have no per-call bill to protect, and a local proxy can't sit inside those apps. The same goes for Claude Code on a Pro or Max subscription.
What happens if the proxy crashes?
Agent calls fail rather than slip past your budget. Restart it with pitstop serve and carry on with pitstop resume.
What does an unknown model cost?
Pitstop blocks the call with a clear message until the model is in the price table. A wrong price would be a bug in the one thing you trust it for.
Set your first budget.
Pick an agent and a budget. Copy the two commands, and your next run pauses before it costs more than you agreed to.