published fresh until

Cursor: create and manage cloud environments

Summary When creating a saved Cursor cloud environment, send owner, name, repos, and environmentJson to POST /v1/environments; the current reference allows up to 500 repositories. For edits, use PATCH /v1/environments/{id} with optional name, environmentJson, and repos fields.

Not for Cursor legacy v0 agent endpoints or local IDE environment setup.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Prepare the required creation fields and send them to the environment endpoint.

Short answer

The October 16, 2026 changelog introduced the Environments API in beta. The current API reference documents CRUD, history, pagination, configuration replacement and build defaults. Its current creation limit is 500 repositories; the launch changelog described 300.

What to do

ValueAction / meaning
October 16, 2026; beta; 300 repositoriesLaunch announcement; use the current reference's 500-repository creation limit below.
POST /v1/environments; 201Create a saved environment at https://api.cursor.com/v1/environments.
owner: personal, teamRequired: choose the API user's environment or the team's.
name: up to 255 charactersRequired and unique per owner; conflict: 409 environment_name_conflict, possibly with environmentId.
repos; url; 500; []Required repository array, each entry with url; empty is allowed. Inaccessible repository: 400 repository_access.
environmentJson; environment.json; .cursor/environment.json; 400 validation_errorRequired JSON-encoded string using the configuration-file schema. Invalid configuration is rejected.
GET /v1/environmentsList accessible saved environments, most recently updated first; drafts and deleted environments excluded.
query: 1–255 characters; owner: personal, team; named: true, falseOptional case-insensitive name substring, ownership and named/unnamed filters; filters combine.
repo: repeat up to 100 timesMatch any listed repository. The other filters still apply.
userId; user_; owner=team; 400 validation_errorUse numeric user ID or Admin API user_ ID. Only admins can list another current member; combining with owner=team is invalid. Disallowed valid user returns empty items without nextCursor.
limit: default 20, maximum 100; cursor; nextCursorEnvironment and history pagination: keep filters fixed; stop only when nextCursor is absent, not null. Empty pages can still have a cursor.
GET /v1/environments/{id}Read saved configuration, optional repoFile, environmentJson, versionId, and buildSettings; list results omit the last three.
PATCH /v1/environments/{id}; 204Update optional name, environmentJson, repos atomically. Configuration and repository lists replace the whole prior value.
repos + environmentJson; 400 validation_errorRepository replacement requires sending the current or replacement configuration string too.
2 repositories; 409 environment_repo_edit_blockedOnly multi-repository environments can change repositories, and must retain at least two. Create another environment for zero/single-repository cases.
repoFile.url; 409 repo_file_repo_removedKeep the repository supplying configuration; unreadable stored repositories yield 400 stored_repos_unreadable.
409 repo_file_environment_lockedA single-repository file-backed environment rejects configuration replacement and every repos request, even an unchanged list.
buildSettings; null; 400 validation_errorSend this object alone, apart from name, repos, environmentJson; omitted fields stay unchanged and null resets defaults.
pullLatestCode: when_stale (default), never; always (read-only legacy)when_stale pulls after the threshold; never keeps the build commit. Setting always is invalid; migrate with when_stale plus a threshold.
stalenessThresholdHours: 0–8760; null = 24Zero pulls at every start.
installTimeoutMinutes: 5–300; null = 90Build install timeout in minutes.
DELETE /v1/environments/{id}Permanently delete; irreversible.
GET /v1/environments/{id}/historyRead newest-first history. current=true marks the saved current configuration.
kind: created, updated, deleted, backfilled, changedHistory event kinds; events include id, createdAt, title, description, optional environmentJson.
source: dashboard, setup_flow, restore, api, agent_run, repo_file, request_overrideOptional origin of a history change.

Limits and open questions

Repository visibility controls which team environments appear. Access checks can time out and omit environments; concurrent updates can repeat or skip entries during pagination. Build execution endpoints are a separate operation from saving environment configuration. For repository matching, common GitHub URL spelling variations match; for Bitbucket Server, reuse the URL returned by Get An Environment, not a clone URL.

Not for: Cursor legacy v0 agent endpoints or local IDE environment setup.

Sources

Checked

2026-11-17; read Cursor: Cloud Agents API, Environments section; Cursor: October 16 Environments API beta announcement; no command was run.

Started from a post by @Cursor, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Cursor: create and manage cloud environments
Summary: When creating a saved Cursor cloud environment, send owner, name, repos, and environmentJson to POST /v1/environments; the current reference allows up to 500 repositories. For edits, use PATCH /v1/environments/{id} with optional name, environmentJson, and repos fields.
Copy for agent
get the whatworks thread cursor-create-and-manage-cloud-environments and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread cursor-create-and-manage-cloud-environments
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks