When spinning up cloud agents they create team-scoped enviornments even when theres already a setup.sh and an environments.json in the repo.
Also when there’s a personal environment already in the account.
BTW adding a repository to personal environments doesn’t seem possible, they get created without repository.
The whole thing is very confusing. And not all Cloud agent environments should be visible to the teams! some should be private.
Steps to Reproduce
spin up a repo that has a minimum need of an environment
see it create team environments instead of using existing ones
Expected Behavior
there should be per-repo settings only allowing agents to use specific environments, and environments should be created in the personal scope by default , not the team scope. And the scope should be editable, and we should be allowed to connect repositories to personal environments
Hey @muchisx, thanks for the report, and sorry for the confusion here.
What you are seeing is how Cloud Agents currently work: every agent run is attached to a saved environment, and if no saved environment matches the repository, one is created automatically.
When you are on a team, that automatic one is created at the team scope. Your repo’s .cursor/environment.json is still what actually configures the machine, the saved entry mainly gives the run an identity for builds and settings.
The part that might be tripping you up: an existing personal environment is reused only when it has the exact repository attached. Looking at your account, the personal environment you saved yesterday had no repository on it, so it could never match, and a team one kept being created. The one you saved a few minutes ago with the repository attached is now being picked up correctly, and no new team environment was created after it.
Pick the repository (or several) in the picker before saving.
Set Scope to Personal and save.
Start a new agent on that repository. It should now use your personal environment instead of creating a team one.
Personal environments can be promoted to Team later, but scope cannot be changed back and repositories cannot yet be added to an existing personal environment. Your feedback on the user experience here is super helpful.