An account is a login, or an API key, that lets Condensate call a model provider. You sign accounts in once, from the Accounts section of Dex, Condensate's browser app, and every agent shares them.
Three choices meet when an agent starts. The model writes the answer, the engine is the program that runs the agent, and the account pays for the calls. You pick the model, Condensate picks the engine from it unless you name one, and the account comes from the list your workspace allows.
The four account kinds
| Account kind | Engines it pays for | How it signs in | Registry name |
|---|---|---|---|
| Claude subscription | claude (Claude Code), and condensate for a Claude model | Browser page, then paste a code | claude |
| Codex subscription | codex (Codex), and condensate or pi for OpenAI models | Device code | codex |
| OpenCode subscription | condensate or pi for OpenCode Go models | Device code on the OpenCode Console, or a pasted Go key | opencode |
| Cerebras API key | condensate or pi for Cerebras models | No sign-in. It reads a key. | cerebras |
pi is the API engine. Dex shows the four kinds as Claude, OpenAI Codex, OpenCode Go and Cerebras. Engines explains the engines.
Sign in from Dex
Open the Accounts section. It lists every account the runtime holds, one card each, with the usage left in each window. The runtime is the service that runs agents and keeps their threads.
To add a Claude or Codex account, press Add account, type a name, pick Anthropic or OpenAI, and press Create account and sign in. Creating the account and signing it in are two steps, so if the sign-in fails, Retry sign-in tries again without creating a second account.
A Claude sign-in shows a link to Anthropic's sign-in page. Sign in there, and the page shows a code. Paste it into Dex, either as code#state or the code alone.
A Codex or OpenCode sign-in shows a short code and a link to the provider's device page. Type the code there. You paste nothing back, because the runtime polls the provider until the sign-in is done, never more than once a second.
The form offers only Anthropic and OpenAI. To add an OpenCode account, create it over HTTP first. Its card then shows Sign in again, which starts the device code.
curl -fsS -X POST http://127.0.0.1:4741/accounts \
-H 'content-type: application/json' \
-d '{"name":"my-opencode","engine":"opencode"}'
| Route | What it does |
|---|---|
POST /accounts | Creates an account. The body is { "name", "engine" }. |
POST /accounts/opencode | Creates an OpenCode account from a pasted Go key. The body is { "name", "key" }, and the key must be at least 8 characters. From then on the runtime shows only its last 4. |
POST /accounts/:name/login/start | Starts a sign-in. The body is { "engine" }. |
POST /accounts/:name/login/complete | Finishes a Claude sign-in with the pasted code. |
GET /accounts/:name/login/:state | Says whether a device-code sign-in is waiting, done or failed. |
These routes answer only requests sent from the same machine, straight to the runtime. A request from another machine is refused with 403 peer-refused, and one that came through a proxy with 403 proxied.
A sign-in can be used once and expires 10 minutes after it starts. The runtime keeps at most 64 sign-ins waiting and drops the oldest past that. A sign-in that expires or fails can be started again under the same account name.
A failed sign-in answers { "code", "id" }, and the runtime's log has one line with the details that starts account_login_failed id=<id> code=<code>. The codes are login-expired, code-refused, exchange-failed, proxy-unreachable, store-write-failed, account-missing, state-spent and answer-unreadable.
An account name has 1 to 32 characters: letters, digits, dashes and underscores, starting with a letter or digit. Two accounts of one engine can't have names where one starts with the other, such as work and work2. The second is refused with 409 placeholder-clash.
A Cerebras account has no sign-in. Its key lives in an environment variable or a file under ~/.config/condensate/cerebras, or the folder CONDENSATE_CEREBRAS_KEYS_ROOT names.
Where accounts are stored
The account list is ~/.config/condensate/accounts.json, or the file CONDENSATE_ACCOUNTS_FILE names. It holds names, engines, health and file locations, never a token or a key. Each subscription account has its own login folder. If the file is missing, the runtime uses two accounts named default: a Claude account in ~/.claude and a Codex account in ~/.codex.
A Claude or Codex login is refreshed within 60 seconds of expiring, and an OpenCode login a day before. One process does all the refreshing, and agents get only a short-lived access token. Security explains why.
Health and failover
Each account has one health state, and the runtime reads it when it picks an account for a turn. A turn is one message to an agent and its full reply, tool calls included.
| State | What it means | What to do |
|---|---|---|
healthy | Ready to use | Nothing |
needs-login | The login is missing or was revoked | Sign in again |
exhausted | The quota is used up until a known time | Wait for the reset. A Codex account can spend a reset credit with POST /accounts/:name/reset-credits/consume. |
org-disabled | The provider turned the account off | Fix it with the provider, then call POST /accounts/:name/reenable |
workspace-owner-usage-limit | The owner of the provider workspace hit a usage limit | Raise the limit, then call POST /accounts/:name/reenable |
workspace-member-usage-limit | This member hit a usage limit | Fix it with the provider, then call POST /accounts/:name/reenable |
Only quota and sign-in failures move work to another account or model. Any other error keeps its turn where it is, so a real bug doesn't burn a second model.
When the turn's account runs out before any tool has started, the turn runs again on the next account. Once a tool has run, a replay could write a file twice, so the runtime moves the agent to the next account and starts a new turn there that tells the agent which tools already ran.
For Claude accounts, the runtime reads each account's five-hour and weekly usage and picks the one with the most quota left for the time left in each window, so no account runs out early. With no usage reading it keeps the order of the account list. Set CONDENSATE_ACCOUNT_PACER=shadow to log the choice without acting on it.
When every account an agent may spend is out of quota, the workspace's quotaFallback decides whether the agent waits for the reset or moves to another model. The runtime answers NoSpendableAccount rather than spend an account outside the workspace. The model order is CONDENSATE_AGENTS_FALLBACK_CHAIN, a comma-separated list of engine:model entries. A sign-in failure uses the same order unless CONDENSATE_ROUTING_FAILOVER_AUTH sets its own. A caller can pass its own order when it starts an agent, and an empty order turns model fallback off for that agent. When a model refuses a request, the runtime remembers that for one hour, and POST /accounts/model-refusals/clear forgets it.
Which accounts a workspace may use
A workspace spends the accounts it lists in ~/.condensate/workspaces.json. Starting an agent on another account is refused with 400 account-not-in-roster, and the answer includes the list. Workspaces has the file format.
On a fresh install, the installer writes one workspace, condensate, with an empty list, and the first account you sign in for each engine joins it as engine:name, such as claude:personal. A second account of the same engine, or one another workspace lists, doesn't join, so add those yourself.
Completions endpoint
The runtime serves an OpenAI-compatible API on port 4741, so your own programs can run on the same accounts and limits as your agents. POST /v1/chat/completions sends one request through a workspace's accounts, and GET /v1/models lists the models it serves with each model's engine and provider.
| Header | What it does | Default |
|---|---|---|
x-condensate-workspace | Which workspace's accounts to use | CONDENSATE_COMPLETIONS_DEFAULT_WORKSPACE. With neither, the request is refused with 400 workspace_required. |
x-condensate-session | Groups calls into one session | None |
x-condensate-traffic | work for real calls, smoke for tests. A model refusal in a test is reported but not saved on the account. | work |
A request moves to another account only before any output has been sent. Each call writes one usage record with its token counts and the account and model names, and never a key or a token.
| Answer | When |
|---|---|
429 rate_limited | The provider asked for a pause |
429 quota_exhausted | Every account for the model is out of quota |
404 model_not_found | The model is not served |
409 account_access_blocked | The provider blocked the account |
503 account_needs_login | The account needs a sign-in |
502 upstream_failed | The provider call failed for another reason |
Credential proxy
Agents hold placeholder values in place of real credentials. The credential proxy, iron-proxy, runs on the runtime's machine and puts the real credential into each request on its way out. It is on by default, and Security explains what it protects.
CONDENSATE_PROXY_URL is the proxy's address, http://127.0.0.1:8080 by default, and CONDENSATE_PROXY_CA the certificate file agents trust. CONDENSATE_PROXY_MANAGEMENT_URL and CONDENSATE_PROXY_MANAGEMENT_KEY_FILE reach its management API, and the placeholder files live in CONDENSATE_PROXY_SECRETS_DIR, ~/.config/condensate/iron-proxy/secrets by default.
The runtime doesn't start if the proxy doesn't answer within 30 seconds or one of its files is missing. When a token changes, the runtime writes the placeholder file and calls POST /v1/reload on the management API. To run without the proxy, set CONDENSATE_PROXY=off. Agents then hold real credentials.
Model routing
A model named when the agent starts wins, then CONDENSATE_AGENTS_DEFAULT_ENGINE and CONDENSATE_AGENTS_DEFAULT_MODEL, then the routing file CONDENSATE_ROUTING_FILE names. Claude models run only on Claude accounts. A model and an engine that don't match are refused before the agent starts. The model is fixed when the agent starts, so changing a default changes only new agents.
The HTTP reference lists every account route, and the SDK's Accounts service covers the same steps for TypeScript. See SDK.