OpenHands vs OpenCode on Kimi K3: 3 runs each

Model: Kimi K3

Two coding agents, one model, one endpoint. We ran the same task three times through each and counted what the gateway billed.

OpenCode finished all three: 17, 20 and 20 seconds, $0.064, $0.042 and $0.053. OpenHands finished two: 35.7 and 45 seconds at $0.065 and $0.087. The third run died at 21 seconds in a stuck loop.

Averages: 19.0s and $0.053 per run for OpenCode, 33.9s and $0.070 for OpenHands.

Disclosure: Wallaby sells API access to Kimi K3, the model both agents used here.

The task

A three-file toy repo. app.py has a greet() that ignores its argument, so three pytest tests fail. The prompt asks the agent to fix the bug, add a --upper flag to the CLI, and run pytest to verify:

In this repository the tests fail. Fix app.py so all tests pass, and add a --upper flag to the CLI that uppercases the output. Run pytest to verify.

Every run started from a fresh copy of the repo. Both agents ran with tool approval off, so neither stopped to ask permission. Host: macOS 26.6.2 on Apple Silicon.

Versions: OpenHands SDK 1.21.0, CLI 1.16.0. OpenCode 1.19.5, model kimi-k3 on https://api.wallabytoken.com/v1.

Results

Run Agent Wall Model calls Input tokens Output tokens Cost Result
1 OpenHands 35.7s 10 78,891 1,414 $0.065 3 passed
2 OpenHands 45s 14 115,467 2,053 $0.087 3 passed
3 OpenHands 21s 6 44,639 810 $0.057 3 failed
1 OpenCode 17s 9 53,870 623 $0.064 3 passed
2 OpenCode 20s 7 46,262 578 $0.042 3 passed
3 OpenCode 20s 9 62,425 919 $0.053 3 passed

Cost uses our list price: $2.70 per million input tokens, $13.50 per million output, $0.27 per million cached input. Token counts come from the gateway request log, so they include every call the harness made, title generation included.

Where the difference comes from

Turn count first. OpenHands made 10, 14 and 6 model calls. OpenCode made 9, 7 and 9. Every turn resends the conversation, so each extra turn costs more than the last. OpenHands' second run paid for 14 turns and 115K input tokens to fix three tests.

Then output length. OpenHands wrote 1,426 output tokens per run on average, twice OpenCode's 707. Longer messages get resent on the next turn too, so verbosity compounds.

Cache softens the input bill but does not reverse it. OpenHands hit 87%, 90% and 69% cache rates; OpenCode 68%, 81% and 84%. Cached input is ten times cheaper, which is why a 79K-token run still lands at seven cents.

The failed run is the expensive kind. Six calls, 44,639 input tokens, no fix. The SDK's loop detector stopped it with "Stuck pattern detected", which is correct behavior, but the tokens were already spent and the repo was still broken.

What this does not say

Three runs on a toy repo is a data point, not a benchmark. A real repository will push both numbers up, probably by a lot, and the ratio may move.

OpenHands ran headless through the SDK, not the desktop app. Same agent core, no UI layer.

OpenHands also ran with three tools: terminal, file editor and task tracker. Its browser tool set crashes on unlocked installs with mcp 2.x, so it was removed. Fewer tools, not more, which means the cost gap is not explained by extra tooling.

When OpenHands is still the right pick

Cost per run is only one number. OpenHands ships agent profiles, a Model Router that picks a model per task, scheduled automations, and per-conversation Docker runtimes. It can also launch Claude Code, Codex, Gemini, Pi and OpenCode through ACP. If you want a control center for agents running on your own machine, OpenCode is a terminal agent and does not try to be that.

This is one terminal task with one model. For orchestration, compare features against this table.

The browser tool crash, if you hit it

get_default_tools() includes browser_tool_set. On an unlocked install (uv tool, pip, npm run dev), the resolver picks browser-use 0.11.13 with mcp 2.3.0, and construction fails:

AttributeError: 'Server' object has no attribute 'list_tools'

On 1.21.0 the exception propagates out of the conversation and kills the process, so the run dies instead of continuing without a browser. The workaround:

from openhands.tools import get_default_tools

tools = [t for t in get_default_tools() if t.name != "browser_tool_set"]

Issue: OpenHands/software-agent-sdk#5152, still open. The fix PR #4406 has been open since August.

Running either one on this endpoint

Both agents accept a plain OpenAI-compatible endpoint: base URL https://api.wallabytoken.com/v1, model kimi-k3, your key. No proxy, no adapter.

Setup guides, if you want to repeat the test on your own repo: OpenHands, OpenCode, and the OpenHands error map for the failures that are not about the model.

The pricing page has the per-million numbers both runs were billed at.

Like the Dispatch? Add Wallaby as a preferred source on Google, or subscribe via RSS.
Did this help?