There's a question I see pop up in every self-hosting community, every time a new open-source coding agent drops: "Can I cancel Claude Code / Cursor yet?" It's the $20-a-month question. You love your subscription tools — they genuinely make you faster — but the recurring bill grates, and every week the open-source alternatives get a little closer.
Back in June, I wrote a deep guide to self-hosted AI coding assistants, and the honest verdict was: local models were great for autocomplete and privacy, but the agentic stuff — the "go find this bug across my whole repo and fix it" stuff — still belonged to the cloud. That post predates the tool I'm about to benchmark, and the landscape has shifted.
Enter Qwen Code (qwen-code). It's climbing the GitHub trending charts, and it's positioned as exactly the thing everyone's been waiting for: an open-source, terminal-native coding agent in the same genre as Claude Code — but one you can run against Qwen's own models, including locally through Ollama, instead of paying Anthropic $20/month.
So I spent a week actually using it. Not reading marketing, not skimming the README — pointing it at real code alongside Claude Code and Cursor and comparing what came back. This is the honest benchmark, the "exact question people search" answer, minus the hype.
Here's the short version up front, then the receipts.
The TL;DR
- Qwen Code is genuinely good. It's not a toy, not a "self-hosting curiosity." On a local Qwen3-Coder model it does real, useful agentic work on par with mid-tier cloud tools.
- It's not a drop-in replacement for Claude Code. The gap is narrower than a year ago, but it's still there — mostly in long-context, multi-file refactors and the "understand my entire codebase's intent" reasoning.
- Cursor is a different product. Cursor is an IDE with AI woven in; Qwen Code and Claude Code are terminal agents. You can't swap one for the other cleanly.
- The real decision is a hybrid, and I'll lay out the exact split that makes sense for most people.
What Qwen Code Actually Is
Let me be precise, because the name causes confusion. There's a model family called Qwen, and a terminal tool called Qwen Code. They're related but not the same thing.
Qwen Code is a CLI coding agent in the mold of Claude Code. You run it in your terminal, give it a prompt ("fix the failing auth test," "add rate limiting to this endpoint"), and it explores your repo, reads files, plans a change, makes edits, and runs tests — all in a loop, autonomously. It can be driven interactively or scripted, and it supports MCP (Model Context Protocol) servers, so it can reach into the same tool ecosystem that Claude Code does.
The key difference from Claude Code is what model is under the hood. Claude Code is locked to Anthropic's models. Qwen Code is model-agnostic in practice — it's built to pair with Qwen models first, but it can talk to OpenAI-compatible endpoints, which means:
- Cloud: Alibaba's hosted Qwen models (cheap, fast, decent).
- Local: Qwen models running on your own hardware via Ollama or vLLM.
- Hybrid: local for simple tasks, cloud for hard ones.
That last point is the whole game, and it's the thing I tested hardest.
The Benchmark Setup
For this to be honest, I had to compare apples to apples as much as possible. Here's the rig:
Hardware: M4 Mac mini (the one I documented in my local LLM guides) — 64GB RAM, which is enough to run a Qwen3-Coder 30B-class model locally at usable speed.
The three contenders:
- Qwen Code (local) — Qwen3-Coder 30B running via Ollama on the Mac mini, driven by the
qwen-codeCLI. - Claude Code — Anthropic's Sonnet 4.x model via the official CLI, $20/month Pro plan.
- Cursor — the Cursor IDE with its default agent, $20/month Pro plan.
The test tasks — deliberately varied, so one tool couldn't win by being a one-trick pony:
- Bug hunt: find and fix a failing unit test in a small Node.js service.
- Feature add: add rate limiting to a REST endpoint, with tests.
- Refactor: rename a deeply-coupled module across a multi-file codebase and update every reference.
- Explain: walk through an unfamiliar Go codebase and explain the request lifecycle.
- Greenfield: scaffold a small but real project from a one-paragraph spec.
For each, I scored on: correctness (did it actually work), speed (wall-clock to a working result), quality (is the code idiomatic and maintainable), and autonomy (how many round-trips / how much hand-holding did it need).
The Results, Task by Task
1. Bug hunt — Node.js failing unit test
Claude Code: Found the bug in one shot. Read the test, read the source, identified the off-by-one in the date-range logic, fixed it, ran the test suite, green. ~90 seconds, zero hand-holding. A+
Cursor: Found it quickly through its in-editor agent, same fix. Slightly more friction because I had to have the files open in the right context. ~2 minutes. A
Qwen Code (local): Found it, but needed one extra round-trip. First pass identified the right area but proposed a fix that worked only for the specific test case, not the general bug. I nudged it, it corrected, tests went green. ~4 minutes. A-
Verdict: Close. On a scoped, well-defined bug, the local model is right in the same league — just a touch less precise on the first attempt.
2. Feature add — rate limiting an endpoint
Claude Code: Implemented a clean token-bucket limiter, wired it into the route, added tests including the edge cases (burst, reset window). Idiomatic, correct. ~3 minutes. A
Cursor: Similar quality, generated inline in the editor with its agent. Test coverage was slightly thinner. ~3 minutes. A-
Qwen Code (local): Produced a working implementation, but the initial version was simpler — a fixed-window limiter instead of token-bucket, and it missed the "what happens when the limit resets mid-burst" edge case in tests. Functional, not elegant. One round of feedback got it to token-bucket. ~6 minutes. B+
Verdict: The gap appears when the task has design judgment baked in. The local model defaults to the simplest thing; the cloud models default to the better thing. Both work, but one reads like a senior wrote it.
3. Refactor — rename a deeply-coupled module across files
Claude Code: The standout. It mapped every reference — imports, call sites, config keys, string literals in tests — renamed the module, updated everything, ran the full suite, caught the one place I'd forgotten it was referenced. ~5 minutes, essentially perfect. A+
Cursor: Very good, but it struggled with the string-literal references in test fixtures (the things that don't show up in a grep for the symbol). It got ~90% and I fixed the rest by hand. ~7 minutes. A-
Qwen Code (local): This is where the context-window limits bit. The codebase was large enough that the local model couldn't hold the full dependency graph in context. It did a clean job on the files it did see, but missed a couple of cross-file references because it had forgotten them. Required me to point it at the stragglers. ~12 minutes, still missed one. B-
Verdict: Long-context, whole-repo reasoning is the biggest gap. This is the single most important differentiator, and it's mostly about context window, not raw intelligence. If you work on big codebases, this is where Claude Code earns its $20.
4. Explain — unfamiliar Go codebase
Claude Code: Walked the request lifecycle accurately, identified the architecture (clean, layered), pointed out two real concurrency concerns. Concise and correct. A
Cursor: Good explanation, slightly more verbose, leaned on its codebase indexing. A-
Qwen Code (local): Surprising strength here. Because explanation is more about reading than holding a giant context, the local model did very well — accurate lifecycle, correct identification of the hot paths, and a genuine insight about a goroutine leak I'd missed. A
Verdict: For reading and explaining, local is already competitive. This is a great, underrated use case for Qwen Code locally.
5. Greenfield — scaffold a project from a spec
Claude Code: Produced a well-structured project — sensible file layout, config, tests, README. Idiomatic and immediately runnable. A
Cursor: Comparable, with the nice property that the IDE already had the scaffolding conventions. A-
Qwen Code (local): Produced a correct, runnable scaffold, but the structure was flatter and more "script-like" than the cloud tools — fewer layers, less separation of concerns. It worked, but it read like a first draft. B+
Verdict: Same theme as the feature-add: the local model is correct, but the cloud models are more mature in their design instincts.
The Real Numbers
Let me put a scoreboard on it. (Scale: correctness, quality, autonomy, speed, averaged.)
| Task | Claude Code | Cursor | Qwen Code (local) |
|---|---|---|---|
| Bug hunt | A+ | A | A- |
| Feature add | A | A- | B+ |
| Multi-file refactor | A+ | A- | B- |
| Explain codebase | A | A- | A |
| Greenfield | A | A- | B+ |
| Overall | A | A- | B+ |
But here's the thing a raw scoreboard hides: the cost.
- Claude Code: $20/month, and the best result.
- Cursor: $20/month, marginally behind Claude Code, but it's also your IDE.
- Qwen Code (local): $0/month, and a B+ that's within striking distance on most tasks and equal on some.
That last line is the whole story. A year ago the local answer was a C-. Now it's a B+. The trend line is not subtle.
Where Qwen Code Local Wins (Not Just on Price)
It's not only about saving $20. There are genuine reasons to prefer the local option beyond cost:
Privacy, full stop. Your code — proprietary algorithms, client secrets, that side project that might be a startup — never leaves your machine. If you work on anything sensitive (fintech, health, defense-adjacent, or just a product you care about), this isn't a nice-to-have, it's a hard requirement. Claude Code and Cursor both send your code to their servers. Qwen Code locally sends it nowhere.
No rate limits, no throttling. Run it as hard as your hardware allows, all day, for free. Subscription tools have daily caps on the good models that you will hit during a heavy refactor day.
Offline and air-gapped. Works on a plane, in a cabin, in a lab with no internet. This is a killer feature for a certain kind of developer.
Total control over the model. Want to try a different Qwen checkpoint? A smaller model for speed? A fine-tune on your own codebase? You can. With Claude Code you get exactly one model family.
It's an escape hatch from vendor lock-in. We watched Cursor get acquired by SpaceX this year and a whole community scramble to de-risk. An open-source tool you run yourself has no acquirer, no pricing-change surprise, no sudden policy shift.
Where It Still Falls Short (Be Honest)
I want to be fair, so here's the blunt version of where Qwen Code local still loses:
Long-context, whole-repo reasoning. This is the big one, and it's mostly a hardware problem (context window + memory), not a model-smartness problem. If your codebase is large and the task spans many files, the local model will lose the thread. Claude Code's 200K+ effective context is genuinely hard to beat.
Design judgment. For greenfield work and feature design, the cloud models default to better architecture — more layers, cleaner separation, more edge cases handled up front. The local model gives you working code that you'll refactor more.
Multi-language breadth. Qwen's models are strong on Python, Go, JS, and a handful of others, but the long tail — niche languages, DSLs, legacy frameworks — favors the cloud models trained on more of everything.
Setup cost. Claude Code is npm install -g and you're done. Qwen Code locally means Ollama or vLLM, pulling a 30B model, managing memory. It's a homelab task, not a "click install" task. I've written those guides — it's doable, but it's real work.
Tool ecosystem maturity. Claude Code's MCP ecosystem and Cursor's extension marketplace are bigger and more battle-tested. Qwen Code supports MCP, but you'll occasionally find rough edges.
The Decision: Who Should Do What
Here's the split I'd actually recommend, based on a week of honest testing:
Cancel Claude Code and go full Qwen Code local if:
- You work on small-to-medium codebases (the refactor task is where big repos hurt you).
- Privacy is a hard requirement, not a preference.
- You're a homelab/self-hosting type who already runs local models.
- You mostly need bug fixes, scoped changes, and explanations — not whole-repo rewrites.
Keep Claude Code if:
- You work on large codebases and do heavy multi-file refactors regularly. That $20 buys you the long context that's genuinely hard to replicate locally.
- You need the absolute best design judgment on greenfield work.
- Setup friction isn't worth your time.
Keep Cursor if:
- You want the AI inside your IDE rather than in a terminal. Cursor and Qwen Code aren't direct substitutes — Cursor's superpower is the in-editor experience, and if that's what you value, an agent CLI won't replace it.
The hybrid I actually run (and recommend):
- Qwen Code local for day-to-day bug fixes, explanations, scoped changes, and anything sensitive.
- Claude Code (or Cursor) for the big, whole-repo, design-heavy lifts — the tasks where long context and mature judgment earn their keep.
Most of my coding is scoped changes and bug hunts. On those, the local model is close enough that I genuinely reach for it first now. When a task needs the whole-repo reasoning, I pay for the cloud. That split has meaningfully cut my cloud usage — and if the trajectory holds, the cloud-only days are numbered.
The Bottom Line
Qwen Code is the real deal, and the "can I cancel my subscription yet?" question now has a nuanced answer instead of a flat no. For small-to-medium codebases, privacy-sensitive work, and the everyday tasks that make up most of actual coding, the local option is a B+ — good enough that you'll use it, and free enough that it's hard to justify not trying it.
What it hasn't done is close the gap on long-context, whole-repo reasoning and design maturity. Those are the last two hills, and they're being climbed fast. A year ago local coding agents were a curiosity. Today they're a credible daily driver for a big slice of developers. Next year, I suspect the question won't be "can I cancel?" — it'll be "why would I pay?"
The June post I wrote ended with "local models are getting better, faster, smaller." Six months later, Qwen Code is the proof. The gap between self-hosted and cloud is no longer a canyon — it's a ditch, and it's filling in.
Have you tried Qwen Code locally? How does it stack up against your current setup? I'd love to hear real numbers from your hardware — find me on GitHub or drop a note in the comments.
If you found this useful, you might also like my post on self-hosted AI coding assistants and my guide to running local LLMs on a Mac mini.