Use 60% less Opus
in Claude Code
Opus plans. A half-cent model writes the code and proves it with a test. Your Claude plan lasts 2–3x longer.
npx cheap-agentFree · works with Claude Pro and Max · DeepSeek via OpenRouter, DeepSeek or OpenCode Go
> Add monthly budgets to the expense tracker, plus a CSV export. Tests for everything. ● cheapag · delegate (Opus writes one short task) ⎿ OK j4fdk step=1 files=2 +174/-2 tests=pass turns=13 cost=$0.005 repro=fail→pass summary: Added budget set/list, over-budget warning on add, and CSV export. All 38 tests pass. changed: M expenses.js +77 -2 M expenses.test.js +97 ● Budgets and CSV export are in, uncommitted. 38 tests pass. Opus: 57k tokens, 2 turns · Claude Code alone: 154k tokens, 5 turns
The numbers
Tested on SWE-bench Verified: real bugs from real open-source projects, graded by the official harness. Same prompts in Claude Code with Opus, with and without Cheap Agent.
What I won't hide: on the 9 hardest bugs it solved 5 where plain Opus solved 7. On tiny jobs there's nothing to save. It shines on real features and real fixes in real code.
How it works
You keep using Claude Code exactly as before. Cheap Agent is an MCP server and plugin that changes who does the typing.
Opus plans
Turns your ask into one short task. Reads no code.
A cheap model codes
In its own git worktree: writes a failing test, fixes the code, makes it pass.
Cheap Agent checks
Runs the tests itself. Only passing work lands, uncommitted.
Opus tells you
Reads a 10-line result. If the cheap model got stuck, Sonnet finishes, not Opus.
Why I built this
The idea: get $200-plan usage out of the $100 Claude plan, and $50–70 worth out of the $20 plan, with a few dollars of DeepSeek doing the typing.
I've met a lot of students, mostly in developing countries, who really want Opus for the hard problems and simply can't afford $100 a month. This is a small effort from my side. It won't make Opus ten times cheaper, but something is better than nothing.
Install in one minute
You need Claude Code, Node.js 20+, and an API key with a few dollars on it from OpenRouter, DeepSeek or OpenCode Go.
Let Claude Code set it up
Paste this into Claude Code. It asks what you want, then gives you one command to run.
Set up Cheap Agent (npm: cheap-agent) for me.
1. Ask me: which provider (OpenRouter recommended, DeepSeek or OpenCode Go), and which models (balanced is the default; cheapest, strongest, or my own provider/model).
2. Check that node is 20+ and the claude CLI is installed.
3. If I picked my own model, save {"models":{"implement":"<model>"}} in ~/.config/cheapag/config.json, keeping what else is there.
4. Give me the command to run in my terminal: npx cheap-agent login --preset <my choice, or custom>, and which number to pick for my provider (1 OpenCode Go, 2 OpenRouter, 3 DeepSeek). I run it and type my API key there. Never ask for my key.
5. When I say done, check `claude mcp list` shows cheapag, then tell me to run /cheapag:allow in a new Claude Code session in my project.
Or do it yourself
- Run this in your terminal:
npx cheap-agent - Pick a provider (OpenRouter if unsure), press Enter for the recommended models, paste your API key into the hidden prompt.
- In each project, run this once in Claude Code:
/cheapag:allow
That's it. Ask Claude for changes like you always do. A few dollars lasts hundreds of tasks. macOS and Linux; Windows in beta (needs Git for Windows).
FAQ
How do I make my Claude Code plan last longer?
Install Cheap Agent. Opus keeps planning and deciding, while a model that costs about half a cent per task writes the code. In my tests Opus used 59–67% fewer tokens for the same work.
Is a half-cent model actually any good?
On its own, no. With a written task from Opus, a test it has to pass, and Cheap Agent running that test, it is right most of the time. When it can't finish, it says so and a Sonnet helper takes over.
Where does my code go?
To the model provider you pick (OpenRouter, DeepSeek or OpenCode Go), and only after you run /cheapag:allow in that project. Your API key stays on your machine and never goes into the chat.
Will it commit or push anything?
Never. Changes land uncommitted, so you review the diff like any other.
Does it work with the Claude Pro $20 plan and Max plans?
Yes. It works with any Claude Code login. It saves Opus usage, so it matters most on plans with usage limits.
Is Cheap Agent free?
Yes. You only pay the model provider for the cheap model, usually a few dollars for hundreds of tasks. The license (Elastic 2.0) lets anyone use it, including companies; it only forbids selling it as a hosted service.