Qwen Code: what a Gemini CLI fork tells us about open harnesses
In mid-2025 Alibaba's Qwen team wanted a terminal coding agent for their coder models. They did not write one. They forked Google's Gemini CLI, swapped the model client, retuned prompts and parsers, and shipped it as Qwen Code. The tool is solid. The fork is the interesting part.
Qwen Code is the cleanest natural experiment we have for a question that matters to anyone betting on these tools: which parts of a coding agent are durable infrastructure, and which parts are model-specific tuning that has to be redone every time the model changes?
What survives the fork
Nearly all of the code, it turns out. The agent loop (read context, call tools, apply edits, observe, repeat) carried straight over. So did the tool implementations: file reads and writes, shell execution, search, the terminal UI, session handling, MCP support. Google's decision to open-source the whole harness under Apache-2.0 made the fork legal, and the architecture made it practical.
Even the steering mechanism survived as a pattern. Where Gemini CLI reads GEMINI.md for project context, Qwen Code reads QWEN.md. Same idea, different filename. If you can operate one tool, you can operate the other in minutes. The muscle memory transfers almost completely.
Once the harness is Apache-2.0, the agent loop becomes a commodity; the craft that remains is making one specific model feel at home inside it.
What had to be retuned
The parts that changed are the parts that touch the model directly. Tool calling is the big one: models differ in how reliably they emit structured calls and in which formats they saw during training, so Qwen Code adjusted its parsers and prompting for the Qwen coder family instead of trusting Gemini-shaped output conventions. System prompts were rewritten for a different model's instincts. Defaults around context handling shifted to match what the new models tolerate.
This is the underappreciated lesson. The harness is most of the code, but it is not most of the fit. A model dropped into a harness tuned for a different model behaves like a competent contractor handed someone else's toolbox: functional, but fumbling. Tool calls need a retry, and edits land in slightly wrong formats.
Why you might actually run it
- The free tier. Authenticated users get a generous daily allowance (thousands of requests a day as of this writing), which makes Qwen Code one of the cheapest ways to run a real agent loop hard.
- An open-weight escape hatch. The Qwen coder models it targets ship as open weights, so the same tool can point at a self-hosted endpoint when privacy or cost demands it.
- Standard endpoints. Anything speaking the OpenAI-compatible API shape works, so you are not welded to one cloud.
The costs are ordinary fork costs, and they are real. Qwen Code inherits upstream's bugs and must chase upstream's improvements, and fork lag cuts in one direction: features land in Gemini CLI first. The community is smaller. And the tuning cuts both ways: pointing Qwen Code at models outside the Qwen family is off-label use, and it shows in exactly the tool-calling reliability the fork exists to fix.
The fork thesis generalizes
Expect more of these. Every lab with a coder model and no agent team can now stand up a credible CLI in weeks by forking a proven harness, and the open CLI map keeps sprouting branches for exactly this reason. For users, the lesson is to check the license before the feature list: the license is what makes the ecosystem antifragile.
And if you are betting on any of these tools long-term, ask the sharper question: who owns the tuning loop for the model you actually run? The code can be forked in an afternoon. The fit between one model and one harness has to be re-earned every time, and that, not the repository, is the product.