muaaz9329/cheap-ag

Developer Tools

An MCP server for Claude Code where a frontier model plans and writes tasks while a cheap model implements them under test validation.

169
13
TypeScript
MIT
3 days old

What it does

Cheap Agent reduces how much of your expensive Claude plan gets spent on routine coding. Opus (or whichever model you use in Claude Code) writes a short task, a much cheaper model implements it in a private git worktree, and the change only lands after a test written for that task fails first and then passes. Cheap Agent runs the tests itself rather than trusting the model's report, and Opus reads back a short result instead of the full implementation.

The intended user is someone with a Claude Code subscription who wants more work out of the same monthly usage without switching to a weaker primary model. It also suits small teams that want the savings but still require evidence that changes pass tests.

Install and first run

You need Claude Code and Node.js 20+, plus an API key with credit from OpenRouter, DeepSeek, OpenCode Go or Command Code.

The guided path: paste the setup prompt from the README into Claude Code. It asks for your provider and model preset, checks Node and the Claude CLI, optionally writes a custom model config to ~/.config/cheapag/config.json, and gives you a npx cheap-agent login --preset <preset> command with the provider menu numbers. Provider order in that menu is 1 OpenCode Go, 2 OpenRouter, 3 DeepSeek, 4 Command Code. You enter the API key yourself; the prompt must not request it.

The manual path:

npx cheap-agent

Pick a provider (OpenRouter is the safe default), accept the recommended models, and paste the API key. The CLI validates the key and registers itself as an MCP server for Claude Code across projects. Then, once per project, run this inside Claude Code:

/cheapag:allow

That grants permission to send that project's code to the cheap model and shows which models will see it. After that, ask Claude for changes as usual.

Four commands are available: /cheapag:status for recent jobs and spend, /cheapag:hook on to force Claude to hand code changes to the cheap model, and /cheapag:clean to remove old job folders.

Constraints and known limitations

  • macOS and Linux are the supported platforms. Windows is beta: CI-tested but not yet used by a Windows user, requires Git for Windows, and the first job can take about 2 minutes while OpenCode initializes. A crashed OpenCode process may remain running until you end it or restart.
  • Code is sent to the selected third-party provider only after /cheapag:allow in that project. The API key stays in a local credential store.
  • Changes land uncommitted; Cheap Agent never commits or pushes. You review the diff before committing.
  • The cheap model cannot read dependency folders such as node_modules in its worktree, though your tests still run.
  • When the cheap model fails, a Sonnet helper finishes the step by default. You can set takeover: "self" in cheapag.json to let Opus finish instead, capped at 15 tool calls. limits.max_turns defaults to 25.
  • The author reports lower solve rates on the hardest bugs (6 of 9 versus 7 of 9 for plain Opus in a single run) and little savings on very small jobs.
  • MIT licensed, so use and modification inside companies is permitted.

Update and removal

Update with npx cheap-agent@latest; releases are announced on the Releases page. To remove, run claude plugin uninstall cheapag@cheapag and then claude mcp remove -s user cheapag.

HotRepo's take

The repo appeared in HotRepo's new-project list for TypeScript on 2026-11-01 with 169 stars, 13 forks and 67 stars gained over the observation window starting 2026-10-31T14:45:34Z. The hourly samples move from 102 to 169 stars in under a day, which is fast growth for a young repo but does not by itself indicate adoption or quality. No GitHub daily rank or Hacker News thread is recorded. What is worth noting is the design: routing the expensive model to planning and a cheap model to implementation only works if the tests are a real gate, and the author's screenshots rest on that claim rather than on a third-party benchmark result for this specific toolchain.

Written by AI from the project's README, updated . The project's own docs are the source of truth.