Soba Docs

Operating

Environments

Development and production are configurations of a key, not deployments. A development key runs on your own machine and cannot spend money by construction.

Two environments, and the environment is a property of the key:

Compute Purpose
development Your own machine Build and iterate. Never spends money
production Whatever the end user's plan permits Serve real users

A .env.local holds a development key; your production environment variables hold a production key. That is the whole mechanism. Soba deploys nothing and there is no soba deploy, because a second key already buys everything such a command could.

Why this is a correctness feature, not a tier#

Without it, a key used from a laptop during development is indistinguishable from the key serving real users. A developer who pairs their own machine and tests against it creates a user, a machine and a stream of runs served at user-subscription, which is arithmetically identical to a real customer connecting their own compute.

Connection rate would count developers. Inference you didn't pay for would count your own laptop. Every headline number on the dashboard would be inflated by the people building the product, with no way to subtract them.

So development is excluded from every aggregate, and the billing rule gains one clause: bill from usage where environment = 'production', and nowhere else.

The same user in two environments is two people#

You send the same identifier either way — soba.run({ user: "alice" }) is the same line of code in your test and in production — so Soba files the person under the environment of the key that sent it. alice under a development key and alice under a production key are two end users, with their own machines, their own plan assignment and their own place in the figures.

That is what makes the rule above hold for the person as well as the run. Without it, testing against your own laptop as alice once would file her in development permanently: her production runs would be billed while she herself sat on the unbilled side of the ledger, and the laptop you paired during that test — a machine has no environment of its own, it belongs to its owner — would appear in your production machine list.

Pairing happens per environment

A machine paired by the development alice cannot serve a run addressed to the production one, which is the same rule as everything else here: whoever the key says you are is whose machine you reach.

Why two and not three#

The test is reachability, and reachability is binary.

localhost cannot be reached by anybody but the developer sitting at it. That, and nothing else, is why development is free: not the word on the key, but the fact that no real user can get to it. Everything with a public URL can be reached, serves real requests off real people's own subscriptions, and is production by every test the billing rule applies.

Your Vercel preview deployment is production

So is a staging host, and so is an ngrok tunnel. The moment a URL is on the public internet your users can reach it, connect their own machines and be served, which is exactly what a production key describes. Use one.

There used to be a third environment, preview, borrowed from Vercel's triad. It described your deployment pipeline rather than anything Soba decides, and it never earned its place: it billed like production and was displayed like development, so the same run answered differently depending on which page asked.

A development key cannot reach a metered class#

TypeScript
development: { allow: ["user-hardware", "user-subscription", "user-api-key"] }

Not by discipline, by construction. The free tier is accident-proofed rather than trusted: a loop in a test cannot bill us, because there is nothing we sell in allow.

user-api-key is in that list and is the exception worth knowing: it is your own provider key, on your own machine, invoiced to you by Anthropic or OpenAI. A development key cannot spend Soba's money. It can spend yours, if you exported a provider key and told the worker it may use it.

To exercise bought compute, point a production key at it.

How the route resolves#

A key's environment sets a ceiling, and the user's plan narrows within it. Neither can widen the other, and the machine then applies its own grant on top, unchanged. See Security model.

Environment Plan Result
development none; you are not a paying user of your own app the environment's route alone
production the end user's plan the narrower of the two

Two ceilings, not one#

TypeScript
maxCostMicros        // ceiling on ONE run
periodCostCapMicros  // ceiling on the calendar month

Every other ceiling in Soba is per run or per user, and neither stops the failure this exists for: something running unattended in a loop on a metered class. A per-run ceiling is satisfied by each of ten thousand cheap runs. periodCostCapMicros is the aggregate brake, it is optional, and it is worth setting on any key that serves traffic you are not watching.

Your first development run#

The default machine grant is read-only tools inside ~/.soba/workspace, and that default is correct: it is what makes a worker safe to point at a control plane nobody trusts. But it means testing an agent against your own project has every file operation refused, in a directory Soba never granted: a first run that fails looking like a broken product rather than a policy you need to widen.

The fix is not a weaker default. It is that you pairing your own machine to your own development key is a different trust situation: the machine owner and the app owner are the same person. So say so, in the file you control:

Terminal
soba-worker login --dev --root .

Pairs, writes a grant scoped to the current project rather than to the scratch workspace, and prints what it granted. Deliberately explicit, deliberately per-directory, and deliberately not the default for anything else.

The free tier that cannot run out#

A development key points at your own Claude Code or Codex. Your machine, your login, your plan, and you are testing. Soba never touches the compute, so there is nothing for it to bill and nothing for it to subsidise.

Credit-metered free tiers expire by design, and the moment they do you are evaluating a bill rather than a product. This one has no meter to exhaust, because the thing being consumed was already bought by the person consuming it.

Privacy · Terms · DPA · © 2026 Soba resolved = machine grant ∩ broker request