OpenCode now shows what every session costs — we checked it against the bill

Model: Kimi K3 · ✓ Verified on OpenCode Desktop v2.0.29 (macOS); Wallaby statement for the same API key · 2026-10-16

OpenCode v2.0.29 shipped on October 14 with a line in the changelog that matters more than it looks: the desktop app's session view now shows context tokens and accumulated cost per session. (The desktop app is the same OpenCode 2 release line as the CLI, not a separate product.) Pair that with the new provider account management (connect, switch, rename, remove, all from Settings → Providers), and BYOK stops being "set a variable, hope for the best." You can see what you spent.

We ran a real session on Kimi K3 through our own gateway and then did the thing cost displays are rarely subjected to: we reconciled it against the bill. Disclosure: Wallaby Token sells API access to Kimi K3, and the session below ran on our endpoint.

Setting it up

Settings → Providers, then "Show more providers". Wallaby is in the extended list:

OpenCode Providers settings page with the "Show more providers" link highlighted

Pick Wallaby, paste your API key, hit Continue. A "Wallaby connected" toast confirms it, and moonshotai/kimi-k3 shows up in the model picker.

OpenCode Connect Wallaby dialog with the API key field masked

If kimi-k3 throws Model unavailable right after connecting, quit the desktop app fully and reopen it: the v2 background service caches the model catalog from before your key existed. We covered this and the other two v2 upgrade traps in our OpenCode 2 upgrade notes.

What the cost panel actually shows

We gave the session one prompt: "tell me about https://wallabytoken.com". K3 fetched the site and described our own service back to us, ABN, itemized billing, the works, which made the session easy to audit later. The session view then itemized every message:

OpenCode session view showing per-message token counts, cost, and the pricing basis

Each row carries the model, stream speed, input/output tokens, cost, first-token latency, and the pricing basis it used. No digging through docs to learn what rate you were charged at; it sits in the row.

The Context panel one click away aggregates the whole session: total tokens, input/output split, cache reads and writes, message counts, and a running Total Cost — $0.10 across this session's nine messages over about ten hours.

OpenCode Context panel showing Total Cost $0.10 and token breakdown for the session

The reconciliation

Here are the session's last two message rows, and the corresponding lines from the Wallaby statement for the same key:

Message Tokens in / out OpenCode shows Statement bills
"tell me about wallabytoken.com" 12,648 / 918 $0.046542 $0.046542
follow-up turn 10,322 / 214 $0.030758 $0.030758

Exact to the sixth decimal. The math checks by hand too: 12,648 input tokens and 918 output tokens at the October rates come to $0.0465426. Those were the October rates; Kimi K3 is $2.55 / $12.75 now.

One honest caveat from our own run: OpenCode's family total and our dashboard's daily total did not match, and the reason was us. The test key also served a few CLI experiments that day, and the dashboard counts everything the key touches while OpenCode counts only its own sessions. If you want reconciliation to stay a one-glance affair, mint one key per tool. That is five seconds of setup and it makes any discrepancy meaningful instead of explainable.

For a different read-heavy workload, we also compared OpenCode Browse with built-in webfetch on ten public pricing pages. The Browse cost breakdown shows why fresh input and cache reads matter more than page count.

What OpenCode 2.3 changed about the bill

Three releases between 13 and 18 November changed defaults that move money. We did not re-run these versions for this update. The behavior below is quoted from OpenCode's release notes, and the arithmetic uses Wallaby's Kimi K3.1 Pro rates.

Background subagents became the default in v2.3.0. A subagent now returns a session ID immediately, keeps working in the background, and reports back when idle. Each subagent is its own session with its own context, so three parallel subagents can mean three growing input bills. Budget the fan-out before you parallelize, and watch request count rather than wall-clock time.

Background compaction became the default in v2.3.1. Near the automatic-compaction threshold, the summary is written in the background so the next prompt does not wait. The release notes add the sentence that matters: "a background summary that ends up unused still costs tokens." Short sessions that hover near the threshold can buy summaries they never use. If your sessions are short, compaction.background: false is the cheaper setting. The same release keeps a timed-out shell command running in the background instead of killing it, which is useful for long builds and also keeps the session open long enough to compact.

At K3.1 Pro rates, a 20,000-token input and 2,000-token output summary costs about $0.054, split as $0.036 input and $0.018 output. That is a modeled figure, not a measured one, and your summary size will differ. The point is that it is a real line on the statement, not free overhead.

v2.3.2 fixed a prompt-cache bug worth understanding. GPT-6.2 does not cache a system prompt sent in the Responses instructions field, so every step re-billed it as uncached input. OpenCode now sends the prompt as a leading developer message, cached from the second step. On GitHub Copilot's gpt-6.2-sol, uncached input per step fell from about 14,000 tokens to 3.

The number is OpenCode's. The question is universal: how much of your input is a prefix that should have been cached? A 14,000-token prefix re-sent for 50 steps is 700,000 tokens. At $1.80 per million fresh input that is $1.26; at the cached rate of $0.18 it is $0.126. One zero, decided by whether the prefix hits.

None of this appears as its own row in the message list. Check three lines on the statement instead: cached input, total input, and request count. If cached input stays flat while total input grows, you are paying full rate for a prefix you send on every step, and the client will not flag it. Check the cached line first.

Why this display matters

Agent sessions are where token budgets go to be surprised. A cost figure next to every message changes the ergonomics: you notice the expensive turn when it happens, not on the invoice. And when the number in the client is the number on the statement, you can trust both.

Kimi K3 on Wallaby runs at 15% off the official list — $2.55 per million input tokens, $12.75 per million output, $0.255 on cache hits — with per-token metering and an itemized statement for every key. New accounts get $0.50 in free credit, no card required: create a key, connect it in Settings → Providers, and your next session's cost will be staring back at you.

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