Environment_id is invalid for the current user/team

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

When trying to launch a cloud agent, I get environment_id is invalid for the current user/team. I rebuilt the cloud agent and it worked for a couple runs, but is back to not launch. I’ve tried launching from the agent window and from the web.

Steps to Reproduce

Try and launch a team cloud agent for a repository. A few seconds later, it shows the bad request error.

Operating System

MacOS

Version Information

Version: 3.8.11
VS Code Extension API: 1.105.1
Commit: e56ad3440df06d22ca7501e65fd518e905486ef0
Date: 2026-06-18T01:40:18.333Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

For AI issues: add Request ID with privacy disabled

Request ID: 0317b922-740a-4937-bd0b-fe1112d08139

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Thanks for flagging this, and for including the request ID. This is a known issue we’re actively working on, and a fix is already in progress.

What’s happening: the launch is getting rejected because it’s pointing at an environment that’s no longer valid (for example, the environment was rebuilt/replaced, or the repo or branch it points to has changed). That’s why rebuilding works for a couple of runs and then breaks again - the fresh environment works until the old, stale reference gets reused.

To unblock yourself in the meantime:

  1. Open the environment picker (the Agents window in the IDE, or cursor.com/agents), re-select or recreate your team environment, then refresh the window and retry.
  2. Confirm the repo and branch your environment points to still exist, and that the Cursor GitHub app is still installed on your org with access to that repo.

The fix we’re working on will stop the stale reference from being reused and give a clearer recovery prompt, so this should stop recurring once it ships. I’ll follow up here when it lands - if those steps don’t get you running again, let me know.