A workspace is the settings for one project: the repositories its agents work in, the accounts they may spend, and the models they may run. The runtime, the service that runs and stores agent threads, checks these settings each time an agent starts, and refuses an agent that breaks one before it runs.
The workspace file
The runtime reads ~/.condensate/workspaces.json, or the file CONDENSATE_WORKSPACES_FILE names. It is a JSON object with one workspaces array. You don't restart the runtime after editing it, because the runtime reads the file again whenever its change time or size moves.
A missing required field or a value of the wrong type is an error. A key the schema doesn't know is dropped without a warning, so a misspelled optional field such as modles means no limit. Read the result back to catch this.
With no file there are no workspaces, and every start that names one is refused. A file that exists but can't be read or decoded makes starts fail with HTTP 500 and the file's name, so a broken file never looks like an empty one.
A small file. Replace my-repo with a repository's folder name and my-account with a name from your account list:
{
"workspaces": [{
"name": "my-project",
"repos": [{ "name": "my-repo", "writable": true }],
"accounts": ["my-account"],
"policy": { "models": ["claude-opus-5-5"] }
}]
}
Ask the running runtime what it read. The port is CONDENSATE_AGENTS_PORT, 4741 by default.
curl -fsS http://127.0.0.1:4741/workspaces
The schema is Workspace in packages/agents-host/src/workspace.ts.
| Field | What it means |
|---|---|
name | The name each thread stores. Keep it unique. The runtime doesn't check, and the first workspace with a name wins. |
repos | The repositories the workspace works in. Each entry has a name and a writable flag. |
accounts | The accounts the workspace may spend. A plain name, such as personal, means that account for every engine, and no agent outside the workspace may spend it. A name with its engine, such as claude:personal, means only that engine's account, and an agent with no workspace may still spend it. |
gitIdentity | Whose name commits and pull requests carry. account is the default. app uses the GitHub App, and commits are made as condensate-dev[bot]. |
githubUser | The GitHub login whose token the workspace's agents use, read with gh auth token --user. When gitIdentity is app, the app wins. |
githubReview | What automatic GitHub posts do for the workspace's repositories: off, pending or publish. The default is publish. It sits outside policy, so the policy route can't change it. |
policy | Required. The limits below. Use {} for no limits. |
Repositories
The file names repositories but doesn't store their paths. A repository applies to an agent when its name is one of the folder names in the agent's working path, in any case, so an agent working in /work/my-repo/src matches my-repo.
Set writable: false on a repository the workspace may read but never change. The runtime then refuses pull request work and GitHub writes for it with 409 repo-read-only. The flag doesn't change file permissions in the checkout.
Limits
A field left out of policy means no limit.
| Field | What it does | When it is not set |
|---|---|---|
models | The models an agent may use. A start on any other model is refused with 400 model-not-allowed, and the answer lists the allowed models. | Any model the engine serves |
quotaFallback | What an agent does when every account it may spend on its engine is out of quota. pause waits for the earliest reset. read-only lets reviewer, verifier, scout and research agents move to the next model and pauses the rest. any lets every agent move. | pause |
failover | { "engine", "model" }. When the agent may move, its turn, one message to the agent and its full reply, moves to this engine and model and spends the workspace's accounts for that engine, so the list needs one. | Off. The turn fails and the runtime raises an alert. |
pools.fable | { "maxUtilization", "fallback" }. A Fable agent that would start on an account whose five-hour window is at or past maxUtilization percent runs fallback instead. | No limit |
container | { "cpus", "memoryMb" } for each agent that runs in a container. CPUs 1 to 16, memory 256 to 32768 MiB. | 2 CPUs and 4096 MiB |
PUT /workspaces/:name/policy replaces a workspace's whole policy with the body. The runtime checks the body against the same schema as the file, refuses a pools.fable.fallback model that routing doesn't allow with 400 policy-refused, answers 404 unknown-workspace for a name it doesn't have, and writes the file in one step so a reader never sees half of it.
Limits are checked when an agent starts, so a change applies to agents started after it.
How an agent gets its workspace
An agent can name its workspace when it starts. If it doesn't, the runtime takes the workspace whose repository matches the agent's working path, and failing that the parent thread's workspace. On a Docker install, an agent started with POST /spawn that names no workspace and no working path gets the installer's default workspace, condensate.
A named workspace that doesn't exist is refused with 400, and the message lists the workspaces that do. The runtime never substitutes another.
Before an agent starts, the runtime refuses an account the workspace doesn't list with 400 account-not-in-roster, a model outside models with 400 model-not-allowed, and a model none of the workspace's accounts can run with 400 model-not-served. Each engine needs its own kind of account, and Accounts has the table, along with how the runtime picks among the listed accounts and what happens when they run out.
When the workspace lists no account for an engine, its agents spend only the accounts of that engine that no workspace lists by plain name. One workspace's subscriptions are never spent from another.
Where an agent runs
A workspace isn't a machine. Each agent start names a runner, process, container, k8s or worker, or leaves the choice to the runtime with any.
| Runner | Needs | Runs |
|---|---|---|
process | Nothing. It is the default. | A process on the runtime's machine. Every engine, plugins and MCP servers work here. |
container | CONDENSATE_CONTAINER_IMAGE, CONDENSATE_CONTAINER_PROXY_URL and CONDENSATE_CONTAINER_NETWORK. The Docker install instead sets CONDENSATE_CONTAINER_BACKEND=launcher and CONDENSATE_AGENT_ISOLATION=container, so every agent runs here. | An agent in its own container, with the checkout at /work and no network except through the credential proxy. The API engine is refused. |
k8s | CONDENSATE_KUBECONFIG, CONDENSATE_SEAT_IMAGE and CONDENSATE_PROXY_SECRETS_DIR. A condensate agent also needs CONDENSATE_AGENT_IMAGE, the image its pod runs. | A Kubernetes Job. Claude agents, and condensate agents on a Claude model. A resumed session is refused, because its transcript is on the runtime's machine. |
worker | A worker daemon registered with the runtime. See Where agents run. | A Claude agent on that worker, such as a machine with Xcode. |
The runtime places a condensate agent on a Kubernetes node itself only as a fix, build or review agent, and its pod needs CONDENSATE_AGENT_IMAGE. With no image, a condensate agent the runtime placed itself runs as a process on the runtime's machine with placement k8s-start-failed, and one whose start request names k8s fails. Where agents run has the placement rules.
The container and Kubernetes runners need the credential proxy, so don't set CONDENSATE_PROXY=off with them. The runtime refuses to start a container whose environment holds a real login in place of a placeholder or names no HTTPS_PROXY.
In the Docker install, each agent gets its own clone of its branch under the agent-trees volume. When the clone no longer matches its branch, the next start sets it aside and clones fresh. Set-aside clones stay until you set CONDENSATE_LAUNCHER_PRUNE=on. Then each start removes the ones older than 7 days, keeping the newest 3 for each agent and repository, and logs each removal as launcher_clone_pruned. A removed clone is deleted whole, commits and uncommitted changes included.
MCP servers that need a Mac, such as iMessage, Calendar and Spotify, never run in a container or a Kubernetes pod. An agent that uses them runs as a process on a machine that has them.
Agents and roles
Each agent is one thread with a role: build, review, chat, audit or head. A head thread is a lead agent. It plans the work, hands tasks to other agents, checks their results and reports back to you, and each task it hands out runs as its own agent with its own thread.
A workspace can hold several lead agents, each with a unique name. A spawn names its lead agent in spec.head, for example { "name": "triage" }. A name is 1 to 48 lowercase letters, digits or dashes and starts with a letter or digit. Without spec.head, the lead agent is named default. A second one under a name the workspace already holds is refused with 409 head-name-taken, and spec.head on a spawn that isn't a lead agent is refused with 400 head-slot-without-head.
GET /workspaces/:name/heads lists every live lead agent, the default first. GET /workspaces/:name/head and GET /workspaces/:name/heads/:head return one each, and answer 404 when there is none. To make a lead agent an ordinary thread, call POST /threads/:id/role with { "role": "chat" }. A lead agent that holds any events needs "explicit": true in the body, and leaving the workspace without a lead agent of that name needs "allowHeadless": true.
Pull request review runs through gt-review, whose agents are threads in the same runtime. gt-review covers it.
Memory and events
Each workspace has its own memory bank, named after the workspace. Threads with no workspace use the default bank. Read and write it through POST /workspaces/:name/memory/recall, /retain and /reflect, and browse it with GET /workspaces/:name/memory.
| Route | Returns |
|---|---|
GET /workspaces/:name/events | Every event of every thread in the workspace, as server-sent events |
GET /workspaces/:name/tail | The latest events |
GET /workspaces/:name/changes | Which threads changed, and their sequence numbers |
GET /workspaces/:name/approvals and /questions | Tool calls and questions waiting for a person |
POST /workspaces/:name/prs/:number/agents | Starts a build agent on a pull request's branch |
The HTTP reference lists every route, and Threads and the runtime explains how threads, sessions and runners relate. Before you move the runtime's data, follow the backup steps in Troubleshooting.