Key takeaways
- Open-source coding agents (OpenCode, Cline, OpenHands, Aider, Codex CLI, Goose) now match commercial tools on raw capability. Commercial products still win on polish, onboarding and enterprise admin.
- In one third-party benchmark, the cheapest open harness (Pi) beat Claude Code on cost per successful task: about $0.028 against $0.195. Harness choice matters about as much as model choice.
- Two questions get mixed up here: which tool is better, and which one AI assistants recommend. They have different winners.
- Promptwatch Data shows GitHub, vendor docs and review sites lead ChatGPT citations for software prompts. That favors open-source projects with strong repos and commercial vendors with strong docs.
- Nobody has published clean recommendation-share data for coding agents yet. Treat any claim of a clear winner with suspicion, including ours.
Two contests, not one
When people ask who wins in coding agents, they mean one of two things. The first is which tool a developer should install. The second is which tool ChatGPT, Claude or Gemini names when someone types "best coding agent for refactoring a legacy codebase." Those contests overlap, but the second one is decided by what gets cited, crawled and written about, not only by what works best.
This guide covers both. First the product comparison, using the sources I could verify. Then the part almost nobody writes about: how an open-source project or an API vendor ends up in an AI answer.
One honest caveat up front. I found no dataset that measures how often AI models recommend specific coding agents. The research below is about adjacent behavior (what ChatGPT cites for software prompts). Where I am inferring, I say so.
What counts as open source here
The agentic.ai roundup draws a hard line: only OSI-approved licenses, so MIT, Apache and copyleft ones like GPL or AGPL. It leaves out source-available licenses (BSL, SSPL, fair-code) because they usually fail enterprise legal review. That is a sensible filter. It also means n8n (fair-code) and Dify (modified Apache with hosting restrictions) would not count as open source by that definition, which matters if you are assessing a platform for commercial use.
Most permissive agents are model-agnostic. You bring a key for OpenAI, Anthropic, DeepSeek or a local Ollama model, and the agent runs locally as a CLI or IDE extension, calling out only for inference. So "open source versus commercial API" is partly a false split. The open agent is the harness, and the commercial API is often the engine inside it.
The open-source field in 2026

The projects that keep coming up across sources:
- OpenCode (maintained by Anomaly, formerly SST). Terminal-first, 75+ providers, and the most-starred open coding agent. One source cites 185,000+ stars, another around 196,000. It adds roughly 6,900 tokens before your first message, against about 33,000 for Claude Code. The company earns money from Zen, its model gateway, and a $10/month Go plan.
- Cline. Apache 2.0 VS Code extension with Plan and Act modes and permission prompts at each step. Agentic.ai scores it 20/36.
- OpenHands. MIT core, formerly OpenDevin. Plans and executes through CodeAct, with browser, terminal and files. It reports about 72% on SWE-bench Verified with Sonnet 4.5 via its SDK. Aimed at teams automating repo maintenance and pull request workflows.
- Goose. Apache 2.0, built by Block, moved to the Linux Foundation's Agentic AI Foundation on April 7, 2026. Written in Rust, runs entirely on your machine.
- Kilo Code. Fork of Roo Code, which itself forked from Cline. Agentic.ai says Roo Code was archived on May 15, 2026, which I could not independently confirm. One source also flags that a June 2026 discussion reports no local model support for autocomplete.
- Aider. Terminal pair programmer where every AI edit is a git commit. Developed since 2023.
- Codex CLI. OpenAI's Apache-licensed terminal agent, which is why it blurs the line between open and commercial.
A warning on the agentic.ai scores. Aider gets 7/36 and Codex CLI 11/36, yet the same page's FAQ calls Aider the strongest all-around open agent. Both can't be the whole story. I would use the scores to compare how much autonomy a tool has, not to pick a winner.
Commercial tools: where they still win
The agentic.ai FAQ makes a fair point: on raw capability, open agents use the same underlying models, so the gap is mostly polish. IDE integration, onboarding, managed infrastructure and admin controls are what you pay for.
Community advice reflects this. In a GitHub Community thread from April 2026, one developer praises Claude Code for refactoring and multi-file edits from the terminal, recommends Copilot or Cursor for smooth inline autocomplete, and suggests combining tools. Free tiers matter too: Copilot's free plan reportedly gives 2,000 completions and 50 chat messages a month, and Cursor's free tier a similar amount.

That thread is anecdotal, but it shows the pattern. Developers rarely pick one side. They use a commercial autocomplete plus an agent, open or closed, for the heavy work.
The benchmark that complicates the story
Tensorlake ran four harnesses on the same hard-30 task suite using DeepSeek V4 Flash, which isolates the harness from the model:
| Harness | License type | Passed | Median time | Total cost | Cost per success |
|---|---|---|---|---|---|
| Pi | Open | 20/30 (66.7%) | 132.2s | $0.56 | $0.028 |
| Claude Code | Commercial | 16/30 (53.3%) | 122.7s | $3.12 | $0.195 |
| Codex | Open (Apache) | 16/30 (53.3%) | 245.0s | $1.29 | $0.081 |
| OpenCode | Open | 14/30 (46.7%) | 129.7s | $1.03 | $0.073 |
Two things stand out. Claude Code was fastest but sent about 741,000 tokens per task, versus around 559,000 for Pi. On a subscription you will not notice. On an API key you will. And OpenCode, the most popular open harness, finished last on passes despite its lean prompt.
The author's own caveats matter: Pi ran on high reasoning rather than max, and 24 of its 30 trials went through the official DeepSeek API instead of OpenRouter. It is one run on one model with 30 tasks. I would not build a purchasing decision on it, but the conclusion it supports is useful: pick the harness first and the model second, and test on your own repos.
Head-to-head summary
| Factor | Open-source agents | Commercial tools and APIs |
|---|---|---|
| Cost model | Free tool, pay for inference | Subscription or per-token |
| Model choice | Any provider, local models possible | Usually tied to one vendor |
| Auditability | Full source access | Closed |
| Self-hosting and air-gapped use | Yes | Rare |
| IDE polish and onboarding | Varies, often rougher | Strongest advantage |
| Enterprise admin and support | Limited or paid add-ons | Built in |
| Token efficiency | Varies widely | Can be heavy (Claude Code example) |
| Raw capability | Same models underneath | Same models underneath |
Who wins recommendations in AI answers
This is the part that decides whether a developer ever hears your tool's name. Here is what first-party data says, and where I am extrapolating.
What ChatGPT cites for software prompts
Promptwatch tracks ChatGPT citations at scale. In its software-prompt report (Sep 28 to Oct 4, 2026), GitHub was the most cited domain at 1.2% of software citations, followed by learn.microsoft.com at 0.98% and G2 at 0.73%. By source type, docs and help centers led at 2.64%, vendor sites earned 2.01%, review sites and analysts 1.57%, and GitHub 1.2%.
The shares are small because citations are spread across many domains, and the report does not name any coding agent. Still, the shape is clear. A public GitHub repo, crawlable docs and complete profiles on review sites are the levers. Open-source projects get GitHub for free. Commercial vendors tend to have the stronger docs and the marketing pages.

Content type matters
In Promptwatch's content-type data for the same week, product pages were 22.4% of classified ChatGPT citations and landing pages 16.8%. For commercial prompts like "best X tools," product pages hit 26.0%, landing pages 20.6%, listicles 15.0% and comparisons 7.9%, together almost 70% of citations.
"Best coding agent" queries are commercial. My reading, which is inference and not measured: a commercial vendor's product page gets cited directly, while an open-source project usually depends on third-party roundups and comparison pages to enter the answer. Projects that publish their own honest comparison and landing pages close that gap.
Durability
Promptwatch's content half-life study found landing pages and docs stay cited for months, while news loses half its pages within about 36 days. A launch announcement fades fast. Documentation and a stable landing page do not.
Breadth of sources
Almost half of ChatGPT responses cite 10 or more unique domains, per Promptwatch's unique-domains report. Winning a recommendation is rarely about one page. It is about showing up consistently across the repo, docs, review sites and comparison articles the model pulls together.
How to improve your odds, whichever camp you are in
If you maintain an open-source agent
- Write a README that states what the tool is, who it is for, which models it supports and how it differs from alternatives. Models quote clear sentences.
- Publish docs on a crawlable site, not only inside the repo.
- Make a comparison page that names competitors fairly. Comparisons are 5.9% of ChatGPT citations overall, and higher for commercial intent.
- Check your robots.txt and CDN rules. Blocking AI crawlers by accident is common. Free tools such as Promptwatch's Agentic Readiness Check test which AI crawlers can reach your site.
- Keep your license obvious. Enterprise buyers and the models summarizing for them both look for it.
If you sell a commercial API or agent
- Treat product and landing pages as citation targets: specific, current, and with real numbers.
- Invest in docs and help center content. They lead the software source types above.
- Fill out G2 and Capterra profiles. Review sites earn a real share of software citations.
- Track what AI says about you. Brand Narrative style analysis, which pulls out the individual claims models make, will show whether you are being described as expensive, locked-in or heavy on tokens.
Measure it, don't guess
Coding agents have a twist: developers also ask coding agents themselves which tools to use. Promptwatch tracks how Codex, Claude Code and OpenCode recommend tools, SDKs and docs, alongside ChatGPT, Gemini and Perplexity, which is the closest thing to a direct measurement for developer-tool companies. Its AI crawler logs show whether bots actually read your docs, and prompt tracking shows where you appear against named competitors. Plans start at $95/month, with details at promptwatch.com/pricing. For broader options, the GEO software directory at bestgeosoftware.com lists alternatives.
Which should you choose?
| Your situation | Likely best fit |
|---|---|
| Air-gapped or strict security review | Open source with local models (Goose, Aider, OpenCode) |
| VS Code user who wants control at each step | Cline |
| Team automating PRs and repo maintenance | OpenHands |
| Terminal user who wants maximum model freedom | OpenCode |
| Paying per token and watching cost | Test Pi and Codex before defaulting to Claude Code |
| Want plug-and-play autocomplete plus agent | Commercial IDE tool plus an open agent for big tasks |
| Enterprise admin and support required | Commercial vendor |
The verdict
On capability, it is close to a draw because the models underneath are shared. On cost and flexibility, open source usually wins. On polish and procurement, commercial wins. On AI recommendations, I would not call a winner: the evidence we have says the tool with the best-structured repo, docs, comparison content and review-site presence gets named, regardless of license. Open-source projects start with GitHub's citation weight. Commercial vendors start with marketing pages. Whoever does the unglamorous documentation work wins.
Run your own benchmark on your own codebase, and if you build a developer tool, check what the models say about you before your competitors do.