Setting to force Agent environment to Worktree or Cloud only

Feature request for product/service

Cursor IDE

Describe the request

Describe the request

Add a user (and ideally team) setting that locks Agent runtime to Worktree only, Cloud only, or Local | Worktree | Cloud.

Today Local / Worktree / Cloud is per chat. Default is still the current checkout. There is no way to block Local.

Why

Agents that edit the main working tree collide with WIP, dirty files, and parallel chats. Isolation should be the default, not something you remember to pick every time.

CLI --worktree and /worktree are opt-in per run. cli-config.json has no default environment. Team Cloud settings configure Cloud after you choose it. They do not remove Local.

Proposed behavior

  • cursor.agent.defaultEnvironment: local | worktree | cloud
  • cursor.agent.allowedEnvironments: subset of those three
  • Apply in IDE Agent, Agents Window, and CLI
  • Team/enterprise override that users cannot weaken
  • If Local is disallowed, hide or disable it in the picker

Workaround today

Pick Worktree or Cloud on every chat. Easy to miss. No org-wide lock.

Hey @yuvalshi0

Part of this exists today: in the Agents Window, Settings → Agents → Default Environment lets you set where new agents start (e.g. New Worktree or Cloud), so you don’t have to pick it on every chat.

You’re right that there’s currently no team-level way to lock out Local or a CLI default. Thanks for sharing the feedback!

This actually doesn’t work. @Colin Default environment set to new work tree but when you click on a new chat it defaults to “This mac” instead

Thanks for flagging @bg00!

A couple of recent updates improved how that setting is applied from the different new-chat entry points, so this may depend on your version and where you’re starting the chat. Could you share your Cursor version and exactly where you’re clicking: the New Chat button at the top of the Agents window, the “+” next to a repo group, or the project picker?

One thing to note: the Default Environment setting currently applies to chats started in the Agents window, not chats started in the IDE.