For the complete documentation index, see llms.txt. Every page is also served as Markdown at its URL followed by .md.

standards
EnvironmentsAgents

Environments

Pick the machine a conversation, a routine or an agent runs on, prepared once by a setup script, and the harness that pilots it at launch.


An environment is a recipe for a machine: its repositories, its setup script, its network, its sizes and the harnesses it accepts (Claude Code, Codex, Cursor), all baked into its image. It is also a secret boundary: its variables and its visibility. A custom environment adds the tools its setup script installs on top of a base machine, built and published as a snapshot. It is described by its fields alone: there is no terminal to adjust a machine by hand. Anywhere you start work (a plain conversation, an agent, a routine) you pick an environment, and the pilot that drives its machine: Standards (our agent) or one of the harnesses it accepts. Every use runs on a machine copied from it: nothing a run writes goes back to the environment.

For an ordinary agent or routine, you can keep the Standards environment. Memory and the sandbox are included in its normal built-in tools, alongside web search, images and help from other agents; there is no need to select each one in the main configuration. If a specialist agent or routine needs fewer tools, use … → Advanced settings in the page header to remove individual native groups. The sandbox gives it a working space for calculations and file preparation. Environment and permission restrictions still determine which tools can run. Choosing another environment does not grant additional access, and a routine that runs for each person retains its restricted scope.

Default environments

Four environments exist in every workspace without being created. They have no id and cannot be edited:

DefaultRunsAvailable
StandardsOur agent, in its usual sandbox.Always.
Claude CodeClaude Code on a clean machine.When the Secrets hold ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN.
CodexCodex on a clean machine.When the Secrets hold OPENAI_API_KEY.
CursorCursor's agent CLI on a clean machine.When the Secrets hold CURSOR_API_KEY.

In a new conversation, the environment and the harness are picked apart: the environment chip at the composer's top left lists environments only, No environment first (our agent's sandbox, no machine, while the pilot is Standards; a harness picked beside it runs on that harness's default machine), and the harness picker at its top right lists Standards and the harnesses the chosen environment accepts, or every harness without one. Picking an environment picks its default harness; the picker overrides it. The machine size is not picked in a conversation: it takes the environment's size, and only a routine asks for a larger one. In the harness picker, a harness whose key the Secrets lack is greyed, with a key always shown at the end of its row that opens Settings → Agents → Secrets on that key. A definition whose own Variables hold the key may use the default even when the workspace has none, and so may you when the key is one of your private secrets: it counts for the runs that act for you, not for anyone else's. Only a variable counts: a login named like the key does not. On an instance where harnesses are not enabled, only the Standards default is listed.

Build an environment

Environments are created and configured where they are chosen: the environment chip above the composer of a new conversation, and the Environment row of an agent's or a routine's With. In the composer its menu lists No environment, My environments and Workspace; in a With it lists Default (Standards, then each harness) before them, a key at the end of a harness whose key the Variables lack opening Settings → Agents → Secrets on that key. A cog at the end of an environment you own opens its editor. New environment opens a dialog asking for a name, the harnesses it accepts (or none, for an environment only our agent pilots) and a visibility, then the recipe, repositories and scripts the editor holds; it needs environments:create and is offered only where harnesses are enabled. The new environment becomes the choice, unless that place cannot take it: a workspace routine or agent cannot point at a private environment, so the editor that opens says so and the choice stays as it was. An environment that cannot be chosen is greyed in the menu with its reason: private on a workspace routine. The accepted harnesses can change afterwards: a harness added is baked into the image by the next build, so the environment reads stale at once. An environment created without a harness (a Standards environment) stays one. Secrets have their own page, Settings → Agents → Secrets: your variables, the workspace's, then the logins.

The editor opens in a dialog over the conversation. Its title counts the environment's machines ("3 machines · 1 running"), which opens Machines in Settings narrowed to it; below, groups of settings, each row saying what it is for, top to bottom:

  1. Harnesses: the Accepted harnesses (their logos when there are several) and the Default harness, the one a conversation starts on when this environment is picked. The default is the first accepted harness: choosing another puts it first.
  2. Machine, for a harness environment: Image (Code or Documents), Size (Small, Standard, Large), Largest size, the most a routine may ask for, and Network (Package registries, Full, None, Custom with a list of domains, one per line). Package registries cuts general web access for the agent.
  3. Repositories, one chip each; a chip opens its branch, Prepared in advance and Remove. A prepared repository is cloned at every build and refreshed on every copy; with Prepared in advance off it is cloned only when the agent asks (see Repositories prepared or on demand).
  4. Startup: Setup script and, for a harness environment, Maintenance script, each a row counting its lines that opens a Bash editor with line numbers: Choose file replaces the script with a local text file (a file over 64 KB is refused and the script is kept), and the copy button copies it. The setup script, up to 64 KB (65,536 UTF-8 bytes), prepares the machine: install a CLI, write a config file. A build never starts from the previous version, and runs the script with bash -euo pipefail in the working directory. The script is the reproducible part of the environment. See Build for every step. Environment variables, a row counting the environment's own, opens them beside the workspace's.
  5. Access: the visibility, and where the environment is used once it is.

Every change is a draft until Save, which sends the changed fields in one PATCH; Cancel drops them. There is nothing else to do: the next conversation or run that needs the machine builds it. An environment can be edited during a build; the change is built next time.

EnvironmentBase machineWorking directory
Standards (no accepted harness)Our agent's sandbox: LibreOffice, Poppler, fonts, Python/workspace
With accepted harnessesNode 24, Python 3.14, every accepted harness installed/workspace, whoever pilots it

A real environment's machine has one working directory whatever its pilot: every pilot finds the repositories under /workspace. A machine copied from an image built before this layout keeps /vercel/sandbox/work until the environment is rebuilt (the next nightly rebuild, or any change that makes it stale); the harness defaults work in /vercel/sandbox/work.

The machine and maintenance

Each environment also describes its machine. The size, the network policy and the maintenance script apply to harness environments only: a Standards environment runs on our agent's sandbox, which keeps none of them, so each is refused for it with 400 on its own field (size, maxSize, networkPolicy, maintenanceScript), and its reads return default, { "mode": "full" } and an empty script.

FieldValuesDefault
imagecode (a machine for coding) or documents (our agent's sandbox: LibreOffice, Poppler, fonts, Python). A Standards environment is always documents; code is refused for it with 400 on image.code with a harness
sizesmall (2 vCPUs), default (4 vCPUs) or large (8 vCPUs), 2 GB of memory per vCPU: the size its machines start at.default
maxSizeThe largest size a routine or a conversation may ask for, at least size. A size above it is refused with 400 on size.large
networkPolicyWhat the agent's machine may reach: { "mode": "trusted" } (package registries), { "mode": "full" }, { "mode": "none" }, or { "mode": "custom", "allow": [...] } with up to 100 domains, each optionally prefixed with *.. A bare * or an IP address is refused.trusted for a new environment, full for one created before
maintenanceScriptA script run every time a copy opens, new or resumed, before the harness starts: catch up with the checked-out commit (pnpm install, migrations, starting a daemon). Up to 64 KB.empty

A value out of these bounds answers 400 with SCHEMA_VALIDATION_FAILED, naming the field (size, repositories.0.fullName, networkPolicy.allow.0…). Every read also returns stale (the machine's description changed since its last build), buildFailure (where the last build failed, or null) and v2BuiltAt (when it was last built from these fields, null before a first build).

The image applies to the machine a build prepares and to every new copy. The size is chosen at launch: a routine or a conversation asks for a size up to maxSize, else gets size, and a size above the max does not start (400 on size). A stopped machine is resized before it starts; a running machine already at least that size runs as it is, and is never shrunk; a smaller running one is snapshotted, stopped and resumed at the new size. A machine woken by a link starts at the environment's size. The code image is standards-code, the documents image the agent sandbox's own standards image. The harness defaults run on code at the default size, with full network access.

While a build runs, POST /environments/:id/build answers 409 with SCHEMA_CONFLICT: one build at a time per environment.

Build

A machine is built when a new copy needs it: a conversation's first message or a run's start, on an environment never built or changed since its last build. The turn waits, and the conversation shows Preparing the machine with the current step; turns starting together share one build. A resumed conversation keeps its disk and never waits. A Standards environment builds later, at the turn's first sandbox tool call: a turn that uses no sandbox tool never waits, and a failed build fails that tool call, not the turn, and every later sandbox call of the same turn without building again. An API client can also build ahead of time with POST /environments/:id/build (the owner only), which answers at once.

A build runs as a background job, which survives a restart of the server. It acts as the environment's owner, whoever started the turn: their GitHub access clones the repositories, and an owner who lost access gets a failed setup step. The steps, each with a header line in the log (── setup, ── bake, ── publish):

  1. Setup. A fresh machine is created at the environment's size, with full network access: from the harness's prepared base on the code image, from the image otherwise. An image update reaches builds with the next harness version. The repositories are cloned, then the setup script runs, for 60 minutes at most.
  2. Bake. The harness is installed, unless the base already holds it, and the login shell's environment is captured (see The captured shell for what is kept).
  3. Publish. Credentials are removed (below), the machine is snapshotted and published as the next version, and the version it replaces is deleted.

The machine the build ran on is then destroyed, whether the build passed or not. The whole build is capped at 2 hours; a setup script that runs past its limit fails with exit code 124.

A failed build stops the turn waiting for it. The turn fails with ENVIRONMENT_RUN_FAILED, reason build_failed: "The machine could not be built", and its transcript keeps the log's last 50 lines. You changed the machine, so the previous one is not served in its place; the next message tries again. The published version stays, and the environment reads buildState: "failed" with buildFailure naming the step: { "step": "setup" | "bake" | "publish", "exitCode"?: <n> }. A build that was published meanwhile by another one fails at publish, and its snapshot is deleted. A build whose job stopped running (more than 2 hours 15 minutes after it started) reads failed with { "step": "interrupted" }, and a new build may start.

Variables during a build. The setup script receives only the workspace and environment variables, never anyone's personal variables nor an agent's: the snapshot may be shared with the workspace. Every injected value of 6 characters or more is replaced by *** in the stored build log; shorter values stay visible. The variables the build injected are never captured into the machine's shell environment, whatever their name.

What the build removes before the snapshot: GitHub credentials (the gh login, git credential files and helpers, tokens in remote URLs), the auth lines of ~/.npmrc (_auth, _authToken, _password, username), the auths of ~/.docker/config.json, and the whole ~/.config/gh directory.

A setup script that writes a secret anywhere else keeps it in the snapshot, readable by every run. Write credential files in the maintenance script instead, which runs on each copy with its variables, so they never enter the snapshot.

Repositories prepared or on demand

Each repository of an environment is prepared or on demand. A prepared repository is cloned into the image at every build, its dependencies installed by the setup script. An on-demand repository (Prepared in advance off, lazy: true through the API) is left out of the build and of its fingerprint, and cloned only when the agent asks. Every repository is prepared unless marked otherwise. Switching one changes what the image holds, so the environment reads stale. Opening a copy prepares the prepared repositories; a change's machine also prepares its change's repository, on demand or not, to check out the head branch. Elsewhere, when the run's GitHub access is granted, the repository of the run's GitHub event is cloned at the start of the turn whatever the list says: when the copy opens on a harness, at the first sandbox command on our agent.

The agent clones an on-demand repository with one verb, on every pilot (standards_copy on a harness):

copy from "repository:<owner/repo>[@ref]" to "sandbox:/workspace"
  • It lands in <working directory>/<repository> (the repository's name, without its owner), where a prepared repository lives. to is always sandbox:/workspace.
  • Without @ref it clones the environment's ref for that repository, else its default branch (--depth 50); on a change's machine it clones the change's head branch when that repository has it. With @ref it checks out that ref. The result names the branch checked out.
  • The repository must be in the environment's list (case-insensitive). An environment with no repositories accepts any repository the run's GitHub access reaches. Any other is refused as not found, naming the environment's repositories.
  • Copying a repository already present, prepared or cloned earlier, without @ref stays on the branch it is on: it fetches that branch and fast-forwards it to origin. A branch origin does not have, such as the agent's own work branch, and a detached HEAD are left as they are. With @ref it checks out that ref's local branch (created from origin when absent) and fast-forwards it. Local commits and uncommitted work are kept: nothing is reset, forced or cleaned. A branch with commits not on origin that origin also moved past is left as is, and the result says so in notice. Uncommitted changes that the checkout or the fast-forward would overwrite refuse the copy, naming the directory, and stay as they were. A different repository already in that directory is refused.
  • It writes the repository's own .env.local block.
  • The clone is authenticated by the copy's GitHub access, as the other clones are. On an environment's machine no token is visible to the agent, the network adds it; on our agent's own sandbox, gh is logged in with the run's GitHub token. The list decides what copy clones, not what that access reaches through git or gh.

The turn's instructions list each repository with its directory and whether it is present or on demand (on a change's machine, its change's repository is present), and say how to clone one. A pilot with no machine gets no repository list and cannot clone: copy answers that there is no sandbox, though our agent's description of copy still names the repository: source.

Opening a copy

Every time a copy opens, new or resumed, and before the harness starts:

  1. The network policy is applied. A resumed conversation's copy takes the environment's current policy, so a policy changed between two messages applies from the next one. Whatever the policy, the copy always reaches the harness's model hosts (api.anthropic.com for Claude Code, api.openai.com for Codex, api2.cursor.sh and *.cursor.sh for Cursor) and this instance's Standards API and file storage; with repositories, also github.com, api.github.com, codeload.github.com and *.githubusercontent.com. trusted adds the package registries and toolchain downloads: npm and Yarn, PyPI, crates.io, the Go module proxy, RubyGems, Maven Central, Docker Hub, mise, nodejs.org and www.python.org. none adds nothing; custom adds its own domains; full reaches every host. Anything else is unreachable from the machine, the harness's own web fetches included.
  2. The maintenance script runs, as the image's user (ubuntu) in the working directory, with bash -euo pipefail and the run's Variables. A non-zero exit fails the run with ENVIRONMENT_RUN_FAILED: "The maintenance script exited with 3", and the turn's transcript keeps the script's last 50 lines, every injected Variable value of 6 characters or more replaced by ***. The harness never starts on that copy.

Automatic rebuilds

Once an environment has been built, Standards keeps its machine in line with its description:

  • Stale. Changing what the machine is made of (the image, the size, the accepted harnesses, the setup script or the repositories) or writing one of the environment's own variables marks it stale: the read returns stale: true, and the next new copy builds it. The maintenance script and the network policy apply when a copy opens, so changing them never makes the machine stale, and neither does a workspace variable.
  • Every night. Between 03:00 and 05:00 UTC, an environment a run or a conversation used in the last 14 days is rebuilt when one of its repositories moved since its last build (the branch it clones, its default branch when none is set, points at another commit) or when its last build is more than 7 days old, which picks up harness updates. A repository that cannot be read that night leaves the environment as it is until the next one.
  • One at a time. At most one nightly rebuild per workspace runs at once; the others wait their turn.
  • A failed nightly rebuild keeps the last good machine, whose description did not change, and sends the owner one decision of kind fyi, "“Name” could not be rebuilt", shown under Décisions ▸ Pour toi unless they turned Environment rebuild failed off under Agents in Account ▸ Décisions. A build a turn waits for sends nothing: the turn says it failed.

The captured shell

A login shell is opened in the working directory and its PATH is recorded, so anything your ~/.bashrc adds to it (nvm, bun, corepack shims) reaches every copy. The other variables are recorded encrypted, except any whose name looks secret: names ending in TOKEN, KEY, SECRET, PASSWORD, CREDENTIAL, AUTH, DSN or URL, or starting with TOKEN, KEY or SECRET, are left out. The API returns the variable names, never their values.

A new version applies to runs and conversations started after it; a conversation already started keeps the version it started from.

Everything on the machine is part of the snapshot and readable by every run: an SSH key, a ~/.npmrc, a .env file the setup script wrote. Prefer the Variables for tokens such as GITHUB_TOKEN.

The owner renames or archives an environment from the ⋯ menu. Archive closes the conversations using it. While a routine or an agent still uses it, the archive is refused with 409 ENVIRONMENT_IN_USE, naming them: switch them to another environment first.

Visibility and the shared machine

An environment is private (only its owner sees and uses it) or workspace (every member who may use environments sees and uses it). Only the owner edits, builds or archives it, in both cases.

A copy of a workspace environment is a whole machine: every member who uses it can read its files with a shell, including whatever its setup script left on it. Sharing therefore asks first — "Members will be able to use and read everything this machine holds, including what its setup script left on it." — and the API requires confirmSharedMachine: true with visibility: "workspace", on create and on update; without it the request answers 400 with SCHEMA_VALIDATION_FAILED. A workspace environment reads Shared machine in the list.

A workspace routine or agent may only use a workspace environment or a default one. A workspace environment cannot go back to private while a workspace definition, or another member's, still uses it (400 with SCHEMA_VALIDATION_FAILED).

If the owner leaves the workspace, their private environments are archived and the triggers and schedule of the definitions using them are switched off; their workspace environments stay.

Variables

Variables are the environment variables a run receives. Five layers hold them, and a run reads them in this order, a later layer winning a key it shares with an earlier one:

LayerWhereReaches
WorkspaceSettings → Agents → Secrets, Workspace variablesThe environments it names (below). Listing takes env-vars:read, adding and changing env-vars:create, deleting env-vars:delete.
EnvironmentThe environment editor's Variables card, under the setup scriptThe runs on that environment. Only its owner writes them; a default environment has none.
RepositoryThe same card, with Repository set to one of its repositoriesThat repository's processes on that environment's machines, through its .env.local (below).
PersonalSettings → Agents → Secrets, My variablesThe runs that act for you, the routines that run for you included. Nobody else lists them, whatever their role.
Agent or routineIts Variables row on its pageEvery run of that agent or routine.

Each place shows the same grid: one row per key, one column per layer it inherits, then the layer it writes. A value a later column overrides is struck through, and used marks the one a run reads. An agent's grid has no personal column, since whoever launches it brings theirs; a routine's shows its person's personal column to that person only, and names whose personal variables apply to anyone else.

The environments a workspace variable reaches

A workspace variable reaches Every environment or a list of real environments, chosen in its Reaches column. A new workspace variable reaches no environment until you choose: its row reads Reaches no environment yet. This holds however it is created: the editor, POST /env-vars, POST /env-vars/batch and the CLI. One exception: a key saved as a new workspace variable from a conversation's setup card reaches every environment, since the card asks nothing about environments and the run that asked for the key must read it wherever it runs. Variables saved before this arrived reach every environment.

A conversation with no environment, and the default environments, receive the workspace variables that reach every environment, never one restricted to a list. Through the API, a workspace entry carries environments: "all" or a list of environment ids ([] reaches none). On POST /env-vars, environments applies to a new key only: an existing variable keeps the environments it reaches, whatever the request sends; change them through the batch.

Repository variables

A variable of an environment can be scoped to one of its repositories, so one key holds a different value per repository of one machine (a SUPABASE_URL per app, say). Such a key is left out of the machine-wide process environment and written to <repository>/.env.local, between two marker lines Standards owns; lines outside that block are kept, and the file is listed in the repository's .git/info/exclude. The block is written at each build, each time the machine resumes and at each run start, and holds the repository's value, else the environment-wide one. A write that fails fails the run before its pilot starts, with MACHINE_ENV_FILE_FAILED naming the repository.

A personal or a routine's value never overrides a repository-scoped key: the key stays out of the process environment, the block keeps the repository's value, and the value set aside is ignored (logged by key name only). A private secret is never written to a file a later pilot of a shared machine could read.

Through the API, an environment's batch entry carries repository (owner/name, one of its repositories); an entry never carries both environments and repository. In remove, a bare key removes the environment-wide value only, and { "key": "SUPABASE_URL", "repository": "acme/web" } removes that repository's value only.

A machine holding the repositories of several clients holds the secrets of all of them, and every pilot of it can read them with a shell. Pilots of one machine also share its files: what one harness leaves in its home folder, another can read. Make such an environment private, with grants to the people allowed to see every client.

Readable variables

A variable is sensitive by default: its value is encrypted and never leaves the server. The grid shows ••••••, and the API answers value: null with isSensitive: true. Uncheck Sensitive for a value meant to be read, such as a base URL: the grid shows it with a copy button, and the API answers it in value with isSensitive: false. A sensitive variable becomes readable only by typing its value again; a readable one becomes sensitive from its row's menu, with no value to type.

Paste or import a .env

Add opens an editor of rows: key, value, Sensitive. Pasting several KEY=value lines into a field fills one row per line, Import a .env reads a file, and Edit as text shows the same variables as .env text, where deleting a line deletes that variable. A new key is UPPER_SNAKE_CASE. Save writes everything in one batch, up to 200 keys set and 200 removed, all or nothing: one invalid key or value writes nothing and points at the row.

Model access

Standards never bills a harness turn: the harness reaches its model with your own credential, from the Variables: an API key, or for Claude Code a token from claude setup-token. Signing in on the machine itself is not supported.

  • ANTHROPIC_API_KEY for Claude Code, or a CLAUDE_CODE_OAUTH_TOKEN from claude setup-token (the API key wins when both are set), OPENAI_API_KEY for Codex (CODEX_API_KEY alone does not count), a Cursor user API key as CURSOR_API_KEY for Cursor. The variable layers decide which key a run uses: the definition's first, then the personal variables of the person the run acts for, then the environment's, then the workspace's. The key is handed to the harness without ever entering the machine: env in a copy does not show it.

Without the key, the turn fails with ENVIRONMENT_MODEL_ACCESS_MISSING, naming the missing variable: "No access to the model: add ANTHROPIC_API_KEY in the Variables". It is refused before any machine starts, on a harness default and on a custom environment alike; a conversation created on a harness default without its key is refused too (400).

In the harness picker, a harness without its key is disabled, with a key icon that opens the Variables on it. On a custom environment, GET /environments returns availableHarnesses: the accepted harnesses whose key its runs read, from the workspace variables that reach it, its own and yours. The pilot picker offers those.

Variables other than the harness's own key are set as environment variables in the copy, over the captured shell environment, except repository-scoped keys and the model key of every accepted harness, not only the pilot's: one pilot never reads another's key from the process environment. In a harness conversation they are fixed when its copy starts: a Variable deleted or changed later reaches a new conversation, not one already running. On the Standards harness, every command carries the current Variables and the logins exposed to sandbox scripts. A harness copy never receives a login, even an exposed one: its 2FA code is computed for each command of the Standards sandbox, which a copy never runs.

The model is chosen on the conversation

The environment does not carry a model. A definition's model, or a conversation's model selector, picks one among the harness's models:

HarnessModels (provider / model)Default
Claude Codeanthropic / sonnet, opus, haiku — each the latest model of that familysonnet
Codexopenai / gpt-6.1-sol, gpt-6-luna, gpt-6-astragpt-6.1-sol
Cursorcursor / auto (Cursor picks the model), composer-2.5auto

These are the models every workspace is offered. The model menu shows more when it can: with the harness's key in the Variables (the agent's, else the workspace's), it lists the models that key's account can run, read from the provider (Anthropic, OpenAI, Cursor) and refreshed hourly; without a key it shows the list Standards curates at models.standards.new, else the table above. Only members who may read the Variables (env-vars:read) see the list read with a key; the others see the curated one. GET /environments/harnesses/:harness/models?definitionId=<id> answers { source, models }, where source is live, served or compiled. With auto, Standards sends Cursor no model at all and Cursor uses the one configured for your account. A model under another provider, or an empty model id, answers 400 with SCHEMA_VALIDATION_FAILED; a model id the harness does not know fails at the turn. A conversation takes its agent's model, else the harness default; PATCH /agents/sessions/:id/inference-overrides with { "model": { "provider": "anthropic", "model": "opus" } } changes it from the next turn.

Use it in a routine or an agent

On a routine's or an agent's page, the With rows include Environment; the model is picked in the prompt's footer, among the pilot's models. Its menu creates and configures environments as the composer's does. On a custom environment, the rows add:

  • Pilot: Standards, or one of the harnesses the environment accepts. A run whose pilot the environment does not accept does not start (400 SCHEMA_VALIDATION_FAILED), and its report says why.
  • Size: the recipe's size, or another one up to the environment's largest size at launch.
  • Reuse the branch's machine: runs about the same pull request share one machine (see Machines and links). Only a routine Standards pilots offers it: the runs of a harness each get their own machine. Off on routines created before it; on in the pull-request pipeline templates.

A run whose environment cannot be determined does not start either, and its report says why:

CaseThe run's error
The event's repository is not one of the environment's (an environment without repositories accepts any event)CONFIGURATION_REQUIRED
The size is above the environment's max sizeSCHEMA_VALIDATION_FAILED

Choosing a harness as the pilot clears, after a confirmation, the settings a harness cannot honour:

SettingWith a harness
Prompt, triggers, schedule, webhookUnchanged. The trigger's input reaches the harness inside a <user_data> block.
Budget per runDisabled: billed by your model provider, not by Standards.
Delegation, depth, critic, auto-decideDisabled: the harness orchestrates itself.
ToolsThe harness uses its own built-in tools, plus the Standards workspace tools (standards_search, standards_query, standards_read, standards_write, standards_organize, standards_delete): search, read, create and update records, documents and files, with the data permissions of the person the run acts for. Each call follows the same approval rules as our agent: a call that would need a person's approval (deleting or archiving, sending outside, a write while the conversation is in Manual) changes nothing yet. It is raised as an approval decision for the conversation's approver, the call returns at once and the harness ends its turn. Once approved in Décisions, Standards runs the call once and its result is the next turn's message; once refused, the refusal is. In a run, or a conversation in Chat, the harness reaches the person with standards_send, as our agent does with send, and the message is posted to the conversation; in Details, its text is its reply and standards_send is for questions and for messaging other people or a subagent. With questions it returns at once, the harness ends its turn and waits: the person's answer in Décisions resumes the same harness session, with the answer as its message, and a run's question expires after 24 hours with "no answer". A routine run on an environment stays paused while it waits. A harness decision cannot lock the conversation. A harness that keeps working after raising a decision changes nothing: the decision stays open. A harness never reaches your paired machines or the cloud browser through Standards: it has its own shell. Only memory, GitHub, Slack and trusted MCP servers (mcp:<id>) can be granted; anything else is refused with AGENT_TOOL_GROUP_HARNESS. Every Standards tool is mounted as standards_<verb>, because a harness already has built-in tools called read and write; in the instructions and skills a harness run reads, read, write and delete mean standards_read, standards_write and standards_delete. Every harness is also told to work in Standards first: search the workspace before acting, prefer a workspace skill to one on its own disk, and write what it produces back to records. It receives the workspace's skills index, as our agent does, and reads a skill with standards_read. Every kind the agent is granted is available from the first step, since a harness cannot load a group later, and there is no Standards sandbox, so standards_copy takes one source only, repository: (see Repositories prepared or on demand): a file the harness made in its copy reaches a record through standards_organize, which answers a signed URL the harness sends the file to, then attaches it. standards_send reaches a person and a subagent but not a mailbox draft: drafts are not offered.
MCP serversThe servers granted to the definition (mcp:<id>) reach the harness as tools, called with the identity of the person the run acts for. A server that is not trusted is left out, since nobody can approve its calls there: trust it again from its connector's card on the Connectors page to use it.
SkillsReading skill:<name> through standards_read writes the skill's folder to $HOME/.standards/skills/<name>/ on the harness, read-only, and lists its files without inlining them. The harness opens them with its own tools. A skill with disable-model-invocation: true is not offered but can still be read by name. See Skills and memories.
MemoryWhen the agent or routine is granted memory (see Memory), the harness receives the memory profiles after the agent's instructions — the workspace profile, the profile of the person the run acts for, and the agent's own — and gets the memory kind on standards_search and standards_read, plus standards_propose_memory, called by the agent on behalf of that person. A conversation reads its profiles once, when it starts. A routine has no instructions of its own but still receives the profiles. A conversation without an agent always has memory.

With Standards as the pilot, a custom environment keeps every Standards setting and tool: our agent runs as usual on the environment's machine, the same one a harness would pilot, with exec_command and its file tools working in /workspace. It follows the environment's network policy and its GitHub access, as any pilot of that machine does: a skill that needs a host the policy does not allow fails there. Its compute is metered like the machine's, whoever pilots it. On an environment whose image was built before machines had one working directory, our agent keeps its own sandbox until the environment is rebuilt, and a conversation that already had its own sandbox keeps it.

Through the API, a definition carries harness (the pilot) and environmentId:

harnessenvironmentIdRuns on
absentabsentThe Standards default.
"claude-code", "codex" or "cursor"absentThat harness's default.
absentan environment's idThat environment, piloted by our agent. The environment's harness is not taken in its place.
"claude-code", "codex" or "cursor"an environment's idThat environment, piloted by that harness; a harness it does not accept answers 400.

A definition also carries shareChangeMachine (a boolean, off by default) and size ("small", "default" or "large", at most the environment's maxSize; a definition without an environment that sets size answers 400). Send null to clear harness or environmentId on PATCH. A definition with a harness that carries a disabled setting answers 400 with SCHEMA_VALIDATION_FAILED, naming the field; a grant other than memory or a trusted MCP server answers 400 with AGENT_TOOL_GROUP_HARNESS. Changing the environment counts as changing what the routine does: you become the author of its triggers and the armer of its schedule.

Use it in a chat

On a new conversation, the environment chip sits at the composer's top left (Environments until one is picked) and the pilot picker at its top right, always shown. Environment… in the composer's + menu opens the same menu: No environment, My environments, Workspace and New environment. The Architect work mode offers neither: it works on Standards, and a new conversation that had picked another environment goes back to Standards, and to the model a new conversation starts on, when it switches to Architect. Leaving an environment never changes your default model. The pilot is Standards or a harness: on a custom environment, one it accepts, those whose key its runs read enabled (availableHarnesses); without one, every harness, those whose key the workspace lacks greyed with their key. Picking an environment picks its default harness; the model follows the pilot after a confirmation. A conversation takes its environment's size: only a routine asks for another. Pick them before the first message; after it, the environment and the pilot are fixed for the conversation and shown, read-only, in the conversation's header (nothing for Standards). Through the API, POST /agents/sessions accepts harness, environmentId and size with the same meaning as on a definition; a conversation with an agent takes the agent's. All are fixed at creation. A harness conversation cannot have a past message edited (409 AGENT_INVALID_STATE): send a new message instead.

What a run looks like

  • A routine run on a custom environment gets a machine of its own, runs until its pilot ends, then the machine is destroyed, unless a valid link or an open decision points at it: it is then stopped with its snapshot and destroyed once neither holds. With Reuse the branch's machine, the runs about one pull request share one machine instead (see Changes).
  • A conversation gets one machine of its own, stopped between messages and resumed on the next one with its files and the harness's own history. Archiving the conversation destroys its machine.
  • Pilots on one machine share it. Model keys and the GitHub token are handed over per turn and never stored on the machine, but every pilot of a machine runs as the same user and reads the same files, the previous pilots' homes included. A run starts a fresh harness session: what it must know comes from the pull request, its comments and the decision.
  • No maximum duration. The only ceiling is technical: 24 hours.
  • Queueing. Each person runs up to fifteen routine runs at once on one environment; the others wait their turn, none is dropped. A chat message never waits behind routine runs.
  • No automatic retry. A harness crash, an interrupted run, a harness waiting for input or a conversation that lost its history fails with ENVIRONMENT_RUN_FAILED: send the message again.

The harness's tool calls appear by family — a command, a file read, an edit with its diff — and an MCP tool call as it does with our agent. A failed run stores its error as <CODE>: <message>, which the routine's status line shows.

API

RoutePermissionPurpose
GET /environmentsauthenticated{ defaults, environments }: the defaults ({ harness, available }, Standards first with harness: null), then the environments you can see: id, name, acceptedHarnesses ([] for a Standards environment), availableHarnesses, visibility, ownedBy, ready, version, savedAt, buildState, buildFailure, image, size, maxSize, networkPolicy, stale, v2BuiltAt, shellEnvNames. ?include=usedBy adds usedBy.
GET /environments/:idvisibleAdds setupScript, maintenanceScript, repositories and buildLog.
POST /environmentsenvironments:createCreate { name, acceptedHarnesses, repositories?, visibility?, confirmSharedMachine?, image?, size?, maxSize?, networkPolicy?, setupScript?, maintenanceScript? }; acceptedHarnesses lists at least one harness, none twice, and null is a Standards environment.
PATCH /environments/:idownerChange name, acceptedHarnesses, visibility, image, size, maxSize, networkPolicy, setupScript, maintenanceScript or repositories (each { fullName, ref?, lazy? }, no other field; lazy: true leaves it on demand). defaultForRepositories no longer exists, and a routine body carrying environmentMode is refused: a routine runs on the one environment it names. acceptedHarnesses on a Standards environment answers 400.
POST /environments/:id/buildowner202: start a build in the background (409 while one runs). Read buildState (idle, building, failed), buildFailure and buildLog back. Optional: a new copy builds what it needs.
DELETE /environments/:idownerArchive. 409 ENVIRONMENT_IN_USE while a definition uses it.

An environment you cannot see answers 404; one you see but do not own answers 403 on the owner routes. An environment reads ready once built and not archived; one not built yet can still be attached, and its first turn builds it. Attaching any environment other than the Standards default — on a definition or a conversation — needs environments:read, the use level of the environments capability; member has both levels by default.

The typed client does not cover environments. Call these routes through createTransport:

import { createTransport } from "@standards/client";

const transport = createTransport({
  baseUrl: "https://api.standards.new/v1",
  apiKey: process.env.STANDARDS_API_KEY!,
});

const routineId = "…"; // the routine to move onto Codex

const { defaults } = await transport.get<{
  defaults: Array<{ harness: string | null; available: boolean }>;
}>("/environments");

if (defaults.some((d) => d.harness === "codex" && d.available)) {
  await transport.patch(`/agents/definitions/${routineId}`, {
    harness: "codex",
    environmentId: null,
    model: { provider: "openai", model: "gpt-6.1-sol" },
    maxTreeCostUsd: null,
    toolGroups: ["memory"],
    maxDepth: null,
    critic: null,
    autoDecide: null,
  });
}

Errors

CodeHTTPWhen
ENVIRONMENT_NOT_READY400Archived, or its snapshot is gone.
ENVIRONMENT_IN_USE409Archiving an environment a definition still uses. The definitions' ids are in the error's details.
ENVIRONMENT_MODEL_ACCESS_MISSING400The harness's API key is not in the Variables; the message names it.
ENVIRONMENT_BUILD_FAILED400A build step failed: the setup script exited non-zero, or a step could not run. Recorded on the environment (buildState: "failed", buildFailure, last line of buildLog).
MACHINE_ENV_FILE_FAILED502A repository variable's .env.local could not be written: the run fails before its pilot starts. details.repository names it.
MACHINE_LEASE_FENCED409A writer whose hold on a machine was taken over tried to act on it; it stops. See the lease.
ENVIRONMENT_RUN_FAILED400The harness crashed, was interrupted, waited for input, a conversation lost its history, the maintenance script exited non-zero (details.reason: "maintenance_failed"), or the machine could not be built (details.reason: "build_failed").

When a run or a turn is under way, these surface as its error rather than an HTTP answer. An instance where environments are not enabled answers 503 with CONFIGURATION_REQUIRED. See errors for the shared codes (SCHEMA_CONFLICT, SCHEMA_VALIDATION_FAILED, CONFIGURATION_REQUIRED).

Next steps

Read machines and links for the machines your environments run and the links they serve, agents and routines for triggers, schedules and runs, and roles and permissions for the environments capability.

GitHub repositories

An environment can list several repositories, each with an optional branch. Choose repositories from installed GitHub Apps above the setup script. A blank branch follows the repository's default branch.

A build clones the prepared ones into <working directory>/<repository> before running the setup script, using the builder's linked GitHub account. A fresh conversation copy refreshes those checkouts. A resumed copy keeps its files and current branch. If a GitHub event concerns another repository, the agent can clone it without resetting repositories already present.

During a run or a turn, the GitHub token is never written to the copy and the agent cannot read it. The clones Standards runs itself pass it to git for that one command only, and it is gone before the harness starts. The sandbox network adds it to the requests that leave for github.com, api.github.com and uploads.github.com, and refreshes it on each turn. git clone, git pull and git push over HTTPS work without gh or a credential helper, whatever the harness, Cursor included. gh reads a placeholder GH_TOKEN, which is replaced on the wire. SSH remotes ([email protected]:) are not authenticated: use HTTPS URLs.

Repository failures appear in the build or run context, with the repository and failure status. They do not silently select another account. GitHub-managed credentials, authenticated remotes and GitHub credential helpers are removed before a snapshot is published; if cleanup fails, the build fails at publish. Files and credentials you add for other services remain part of the shared machine, so use Variables for secrets.