Stop paying Opus to type: stretch your Claude plan with Cheap Agent
Cheap Agent (muaaz9329/cheap-ag, MIT, 218 GitHub stars) is a Claude Code MCP server that lets Opus plan while a cheap model writes the code in a git worktree and proves it with tests. This guide installs v1.2.7 with npx cheap-agent, logs in through OpenRouter, DeepSeek, OpenCode Go or Command Code, allows one project with /cheapag:allow, runs a first delegated change, and checks the cost with /cheapag:status, plus the author's SWE-bench numbers and their limits.
- Who: Cheap Agent (cheap-ag), by muaaz9329 on GitHub: an MCP server and Claude Code plugin that delegates implementation from Claude Code to a cheaper model.
- What: Opus plans and decides; the cheap model works in a git worktree, writes a failing test first, and only passing work lands, uncommitted. MIT licence; it never commits or pushes.
- When: Repository created 28 October 2026; v1.2.7 released 31 October 2026. At research time on 2 November 2026: 218 GitHub stars.
- Needs: Claude Code, Node.js 20.11 or newer, and an API key with a few dollars on it from OpenRouter (recommended), DeepSeek, OpenCode Go or Command Code. Runs on macOS and Linux; Windows is beta.
- Author's numbers: On SWE-bench Verified with Opus 5.5, one feature fell from 154k to 57k Opus tokens (63% fewer) for $0.005 of cheap-model time; 7 bug fixes fell 59%; on the 9 hardest bugs it solved 6 of 9 against 7 of 9 for Opus alone.
- Guardrails: Code goes to the chosen provider only after /cheapag:allow in that project. A Sonnet helper finishes stuck steps by default, capped at 25 turns per step for the cheap model.
Why this matters now
Opus is the strongest reasoning model in Claude Code, and also the most expensive way to spend a Claude plan. Every line of boilerplate, every re-run of a test suite, every file re-read while typing burns the same usage as the hard decision that only Opus can make. The author's image for Cheap Agent is a principal engineer: twenty years in, sees the whole system at once, costs a fortune per hour. You would never pay that person to type out a CSV exporter. Yet that is what happens whenever Opus writes the code itself.
Cheap Agent changes who does which job. Opus writes a short task, a cheap model does the typing in its own copy of your project, and the work only lands if its tests pass. The author built it, in his words, to get $200-plan usage out of the $100 Claude plan and $50 to $70 worth out of the $20 plan, with a few dollars of DeepSeek doing the typing. Treat those figures as his aim, not a promise: this guide installs the tool, runs one real delegated change, and shows you how to check what it actually saved on your own work.
What you’ll need
- Claude Code, installed and signed in, with a Claude plan that includes Opus. Cheap Agent delegates from inside Claude Code; it does not replace it.
- Node.js 20.11 or newer. Check with
node --version. - An API key with a few dollars on it from one provider: OpenRouter (recommended by the author), DeepSeek, OpenCode Go, or Command Code (which needs a plan with API access). The author says a few dollars lasts hundreds of tasks.
- A git project with tests for your first delegated change. Cheap Agent proves work with tests, so a project that already runs tests is the honest starting point.
- macOS or Linux. Windows is beta and needs Git for Windows (Git Bash); see the limits at the end before you rely on it there.
Step 1: Pick a provider before you install
Your code will be sent to the provider you pick, so choose deliberately. OpenRouter is the author's recommended default: one key, many cheap models, and the tool asks OpenRouter not to use your requests for data collection. DeepSeek is the direct, single-vendor route. OpenCode Go and Command Code are the other two supported providers. Whichever you pick, you will need its API key in hand during setup, and you will type it into the installer's own hidden prompt, not into chat. The project states that your key stays on your machine, in a hidden prompt and a local credential store, and is never put in chat.
Also decide which model tier you want. The presets are cheapest, balanced (the default) and strongest. On the OpenRouter and OpenCode Go routes the balanced default implements with DeepSeek V4.1 Flash, with fallbacks if a model is unavailable; strongest steps up to GLM-5.3-class models. You can change presets later with a login command, so start with the default and only pay for stronger when a task earns it.
Step 2: Install with one command and log in
Run the installer from your terminal. It is interactive: it asks which provider you want, takes Enter for the recommended models, asks you to paste your API key, checks that the key works, and then adds itself to Claude Code for every project.
npx cheap-agent
If you would rather drive the same setup from inside Claude Code, the README gives a guided prompt you can paste into a Claude Code session. It asks the same questions (provider, models), checks Node 20+ and the claude CLI, and then hands you the login command to run yourself. Either way, never paste your API key into chat: run the command in your terminal and type the key where the installer asks for it.
To log in again later, for example to switch to the strongest preset, use:
npx cheap-agent login --preset strongest
The guided flow uses the same command with your chosen preset and a provider number (1 OpenCode Go, 2 OpenRouter, 3 DeepSeek, 4 Command Code). If you want your own model instead of a preset, save it in ~/.config/cheapag/config.json, keeping anything else already there:
{"models": {"implement": "<model>"}}
Step 3: Verify the MCP server is registered
Installation adds a cheapag MCP server to Claude Code. Confirm it before you trust anything else:
claude mcp list
You should see cheapag in the list. If it is missing, re-run the installer from Step 2 rather than editing Claude Code's MCP configuration by hand: the installer owns that registration. Cheap Agent also tells you when a session starts if a new minor or major version is out; set CHEAPAG_NO_UPDATE_CHECK=1 to turn that check off.
Step 4: Allow one project, once
Open a new Claude Code session in the project you want to use, and run:
/cheapag:allow
This is the consent step, and it matters. It records your OK to send this project's code to the cheap model, and it shows exactly which models will see it. Run it once per project; nothing is sent to the cheap model before you do. The project's safety rules are explicit here: the worker never reads .env and never commits, and changes always land uncommitted for you to review. If a project holds anything you would not send to a third-party model provider, do not allow that project.
While you are here, note the other commands you will use later. /cheapag:status shows recent jobs and what the cheap model has cost you. /cheapag:hook on makes Claude hand code changes to the cheap model instead of doing them itself. /cheapag:clean tidies up old job folders.

Step 5: Ask for a real change, the usual way
Now ask Claude for a change exactly as you normally would. Use a contained, testable job first, not a rewrite. The author's own demo ask is a good shape to copy:
Add a monthly-budget summary to the expense tracker, with a CSV export. Tests for everything.
Behind that one sentence, the division of labour is fixed. Opus writes a short task. The cheap model, driven by the bundled OpenCode engine, works in a private copy of your project (a git worktree), writes a test that fails before its fix and passes after, and fixes the code until it does. Cheap Agent runs the tests itself rather than taking the model's word for it. Only passing work lands, uncommitted, in your real project, and Opus reads a short result and tells you. If the cheap model cannot finish a step, a Sonnet helper finishes it instead of Opus, under the default takeover setting. The hooks stop Opus from quietly redoing work that already passed, or doing a failed step itself when Sonnet can.
When the change lands, review it like any other diff before you commit anything. Cheap Agent never commits or pushes, so the decision stays yours:
git status
git diff
If your project needs a non-standard test command, there is a test_cmd setting in the project's cheapag.json file. The bundled benchmark uses node --test there; set whatever command proves your own project. And expect the first job to take a little while the cheap model's engine sets itself up; on Windows the author warns the very first job can take about two minutes.
Step 6: Check the cost, then tighten the rules
After a job, ask what it actually cost:
/cheapag:status
This shows recent jobs and what the cheap model has cost you. Compare it with what Claude Code reports for the same session: the saving, if there is one, shows up as fewer Opus tokens and fewer Opus turns for the same finished, tested change. Do this for three or four real jobs before you judge the tool. One tiny job proves nothing, and the author is upfront that on tiny jobs Opus is already quick, so there is nothing to save.
Once you trust the loop on small jobs, tighten it. Run /cheapag:hook on so Claude must hand code changes to the cheap model instead of drifting back to doing them itself. Tune the project's cheapag.json if you need to: takeover defaults to "sonnet" (or "self" for Opus, capped at 15 tool calls), and limits.max_turns defaults to 25 turns for the cheap model per step. Switch model presets with the login command from Step 2. Keep updates and removal simple:
npx cheap-agent@latest
claude plugin uninstall cheapag@cheapag
claude mcp remove -s user cheapag

What you built, and where it stops
What you built is a two-tier workflow inside Claude Code: Opus plans, a cheap model types, tests referee, and you review uncommitted diffs. On the author's own measurements, run on SWE-bench Verified with the same prompts in Claude Code with Opus 5.5, with and without Cheap Agent, the savings are large on mid-sized work. One feature fell from 154k to 57k Opus tokens, 63% fewer, in 5 turns down to 2, with the cheap model costing $0.005 and both versions passing all their tests (33 passing without it, 38 with it). Seven everyday bug fixes fell from 1.6M to 655k Opus tokens, 59% fewer, with 7 of 7 solved by both. Nine of the hardest bugs fell from 3.0M to 1.3M, 55% fewer, but solved 6 of 9 against 7 of 9 for Opus alone, with a Sonnet helper doing the leftovers.
Read those numbers for what they are: the author's runs, on his harness, in the project's own bench/ directory, not an independent verification. He also reports the honest caveat himself: on the hardest bugs a single run of plain Opus averages about 6 of 9 too, so the gap is within run-to-run noise, and on tiny jobs there is nothing to save. The “half a cent a task” figure is the cost in his feature example, not a rate: what you pay depends on the model, the provider and the task.
The limits are practical. You still need a Claude plan, because Opus does the planning, plus a funded key for the cheap model. Your code leaves your machine to the provider you chose, so the consent step and the provider choice are the privacy boundary, not an afterthought. Windows support is beta: the first job can take about two minutes while the engine sets up, a crashed engine copy can stay running until you end it or restart, and the cheap model cannot read dependency folders like node_modules inside its copy of the project (your tests still run normally). And nothing here removes review: tests check the work, Cheap Agent runs them, and you still read the diff before you commit. If a change matters, that last step is the whole point.
Frequently asked questions
Do I still need a Claude plan to use Cheap Agent?
Yes. Cheap Agent runs inside Claude Code, Opus still plans and decides, and you still need a Claude plan for that. What it reduces is how much Opus typing that plan costs, by handing implementation to a cheap model you pay for separately with a few dollars on a provider key.
Where does my code go, and what stays on my machine?
Your code goes only to the provider you picked, and only after you run /cheapag:allow in that project, which shows exactly which models will see it. Your API key stays on your machine, in a hidden prompt and a local credential store, and is never put in chat. The worker does not read .env files and never commits.
What if the cheap model writes bad code?
It has to prove its work: it writes a test that fails before its fix and passes after, Cheap Agent runs the tests itself, and only passing work lands, uncommitted, for you to review. If a step stalls, a Sonnet helper finishes it instead of Opus. On the author's hardest-bug set that still meant 6 of 9 solved against 7 of 9 for Opus alone, so review the diff before you commit.