cd /news/developer-tools/one-pass-of-my-eval-bills-9-14-on-th… · home topics developer-tools article
[ARTICLE · art-94173] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

One pass of my eval bills $9.14 on the API and $0 through the CLI

A developer found that running their evaluation suite through Anthropic's Claude Code CLI costs $0 per run, while the same 27 calls via the API would bill $9.14. The CLI prints a total_cost_usd receipt for money not spent, and supports structured output with JSON schema, improving format reliability from 7/15 to 15/15. The developer warns that if an API key is present in the environment, the CLI silently bills the API account instead of the subscription, creating a potential money leak.

read2 min views1 publishedAug 12, 2026

One pass of my board eval bills $9.14 on the Anthropic API. Through Claude Code it bills $0. Same model, claude-opus-4-8.

That is 27 calls, and it is not an estimate. The CLI prints a total_cost_usd

in its envelope: what the run would have cost on the API. It bills the subscription instead, so the number is a receipt for money nobody spent.

Running with `--output-format json`

and `--json-schema`

rides the same structured-output machinery the API does, an internal forced tool call. Format reliability on my suite went from 7 out of 15 to 15 out of 15.

The schema needs relaxing first: strip pattern

, minLength

, maxLength

, minItems

, maxItems

, format

and the $schema

meta-ref, because the CLI validator rejects draft-2020-12. The strict version stays in Zod on the caller side, so nothing is actually loosened, the validation just moves to where it can run.

If ANTHROPIC_API_KEY sits in the child process environment, the CLI quietly bills the API account rather than the subscription. Nothing errors. Nothing warns. The invoice arrives. It gets stripped explicitly at spawn.

This is the failure mode I would look for first in anyone else's runner: the money leak is silent, and the only symptom is a bill at the end of the month for a run you believed was free.

This is a dev-loop tool. Anthropic's consumer terms prohibit automated access "except when you are accessing our Services via an Anthropic API Key or where we otherwise explicitly permit it", and the commercial terms governing API use do not cover consumer subscriptions. An eval runner on my own machine is the CLI used as designed. A shipped service is not.

Iterate on the CLI, ship on the API. What does one pass of your eval suite cost, and does anyone know it?

Originally published at dylan.merigaud.com.

── more in #developer-tools 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/one-pass-of-my-eval-…] indexed:0 read:2min 2026-08-12 ·