{"slug": "we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer", "title": "We Benchmarked Our Agent Against opencode: Same Task, Same Model, 40 Percent Fewer Credits", "summary": "Locally Uncensored benchmarked its coding agent against opencode on an identical bugfix task, finding its 2.6.6 agent used 40 percent fewer credits (1298 vs. 2157 average). The gap stems from token volume, not billing rate, as opencode sends larger fixed prompt blocks and resends more transcript per request. The company also reported an 80 percent credit reduction between its own 2.6.5 and 2.6.6 releases.", "body_md": "Every coding agent says it is efficient. Almost none of them publish the bill. So we ran the boring experiment: the same bugfix, the same model, the same API, the same prices, and a byte identical prompt, once through [opencode](https://github.com/sst/opencode) and once through the coding agent inside Locally Uncensored.\n\nHeadline: opencode averaged **2157 credits** over three runs. Our 2.6.6 agent finished the identical task for **1298**. That is about 40 percent less, and even the cheapest opencode run came in 29 percent above our number.\n\nThe interesting part is not the headline. It is *why* the gap exists, and it is not the reason most people guess.\n\nA cost comparison is only worth reading if everything that drives cost is nailed down. What was held constant:\n\n| Held constant | Value |\n|---|---|\n| Task | Fix a failing test in a small npm repo, then commit |\n| Repository | Three files, a one line bug in `add.js` , tests red at the start |\n| Prompt | Byte identical, sha256 `29cec6c3...cf62687`\n|\n| Model | `deepseek-ai/DeepSeek-V3.2` |\n| Endpoint | The same OpenAI compatible API for both agents |\n| Prices | Same account, same tier, same per token rate |\n| Counting | One wire proxy in front of the API, credits read before and after every run |\n| opencode | 1.18.21 from npm, wired as an OpenAI compatible provider, `opencode run --auto` , otherwise defaults |\n\nSuccess was defined before the runs, not after:\n\n`npm test`\n\npasses`add.js`\n\nchangedAll four runs cleared that bar. Nothing failed, so cost is the only variable that moved.\n\n| Run | Credits | Requests | Prompt tokens | Success |\n|---|---|---|---|---|\n| opencode, run 1 | 1679 | 8 | 98,789 | yes |\n| opencode, run 2 | 2433 | 11 | 146,058 | yes |\n| opencode, run 3 | 2358 | 11 | 146,387 | yes |\nLocally Uncensored 2.6.6 |\n1298 |\n16 | 74,629 | yes |\n| Locally Uncensored 2.6.5 | 4395 | 30 | 257,270 | yes |\n\nRead the last row first. Our own shipped agent from one release earlier is the most expensive thing in that table, by a lot. This is not a chart built so that we win by construction. It is a chart that shows what one efficiency pass is worth, and the previous version of our own software is the loser in it.\n\nThe tempting explanation is that one agent is smarter and needs fewer steps. That is not what happened, and the direction is the reverse of what you would expect.\n\n**opencode used fewer turns than we did.** Eight to eleven requests against our sixteen. If you scored this on steps, opencode wins. The bill went the other way because of what every single request carries.\n\n| Per request | opencode | Locally Uncensored 2.6.6 |\n|---|---|---|\n| Prompt tokens per request | 12,349 to 13,308 | 4,664 |\n| Tool catalogue size | 21,188 bytes | 7,703 bytes |\n| Credits per prompt token | 0.01700 / 0.01666 / 0.01611 | 0.01739 |\n\nThat last row is the honest one. **The billing rate is the same.** Credits per prompt token land within a few percent across all four runs, and ours is marginally the highest of the set. Nobody got a secret discount. The entire difference in the invoice is token volume, not token price.\n\nTwo things drive that volume, and both are familiar to anyone who has built an agent loop:\n\nPut together, a fixed block that size pushes every opencode request past 12,000 tokens. Six agent steps at that weight already approach our total consumption for the entire task.\n\nThe 4395 in the table is not a strawman we built for the article, it is what we shipped in the previous release. Between 2.6.5 and 2.6.6 we went after exactly the two items above: how big the fixed block is, and how much of the transcript gets resent. Measured over the same set of tool driven runs, that cut credit consumption by **78.6 percent**, and on the longest run in the set by **80.4 percent**. The opencode comparison is simply what fell out when we pointed the same measurement at somebody else's loop.\n\nThis is where vendor benchmarks usually go quiet, so here is how far the number actually carries.\n\nWhat the measurement does support is a narrower claim than the headline: on short, well scoped agent tasks, opencode can hardly land below us, because the fixed per request overhead sets a floor. Even its best run, with only eight requests, still needed 98,789 tokens.\n\nopencode finished the job three times out of three, took fewer turns than we did, and produced a clean diff with the right commit message every time. It is a genuinely good agent and it is open source. Nothing here is an argument to stop using it.\n\nIt is an argument to measure your own loop. Agent bills are made of tokens you never see, and two tools that both feel fast can be a factor of 1.66 apart on the invoice. If you build agents, the two numbers worth putting on a dashboard are prompt tokens per request and the byte size of your tool catalogue. They predict the bill better than step count does.\n\nFull writeup with the methodology and the raw counts: [opencode Alternative: We Measured the Cost per Task](https://locallyuncensored.com/blog/opencode-alternative-cost-benchmark.html). The agent lives inside [Locally Uncensored](https://github.com/PurpleDoubleD/locally-uncensored) (AGPL, free), and the hosted models we benchmarked against sit in [LU Labs Cloud](https://lu-labs.ai) if you want them in one picker. You can also point it at a model on your own GPU and skip the API bill entirely.\n\n**Is opencode expensive?** opencode is free. The bill is the model. On this one line bugfix with DeepSeek V3.2 the three runs cost 1679, 2433 and 2358 credits, a 45 percent spread between cheapest and dearest.\n\n**Why does it use so many tokens?** Not through extra steps, it used fewer than we did. Each request carries more: 12,349 to 13,308 prompt tokens against our 4,664, with a tool catalogue of 21,188 bytes against 7,703 resent on every call.\n\n**Is the billing rate really identical?** Yes, and that is the point. Credits per prompt token came out at 0.01739 for us and 0.01700, 0.01666, 0.01611 for opencode. The gap is volume, not price.\n\n**Can I reproduce it?** Three file npm repo with a red test, prompt pinned at sha256 `29cec6c3...cf62687`\n\n, model `deepseek-ai/DeepSeek-V3.2`\n\n, opencode 1.18.21 at defaults, requests counted through a wire proxy, credits read before and after each run.", "url": "https://wpnews.pro/news/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer", "canonical_source": "https://dev.to/purpledoubled/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer-credits-14df", "published_at": "2026-08-23 00:11:55+00:00", "updated_at": "2026-08-23 00:43:28.556911+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["Locally Uncensored", "opencode", "DeepSeek-V3.2"], "alternates": {"html": "https://wpnews.pro/news/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer", "markdown": "https://wpnews.pro/news/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer.md", "text": "https://wpnews.pro/news/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer.txt", "jsonld": "https://wpnews.pro/news/we-benchmarked-our-agent-against-opencode-same-task-same-model-40-percent-fewer.jsonld"}}