Not able to delete cloud environment

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

How to delete the cloud environment? I am not able to see the desktop and only the terminal works. I created a new environment and was able to work properly but i want to delete the old one.
I cant see any option to “delete”
Please help

Steps to Reproduce

  1. Create environment
  2. Try to delete it

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.1.15 (user setup)
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80
Date: 2026-04-15T01:46:06.515Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, I see a screenshot with two agents and “Could not connect to Desktop” on the right. There are two separate things here:

  1. Deleting an environment. Right now, the Cloud Agents dashboard doesn’t have a Delete button for environments. This is a known gap and it’s in the backlog, but I can’t share an ETA. As a temporary workaround, you can ignore the old environment and keep working from the new one. New agents will start from the latest snapshot.

Related thread for context: I can't delete old environments

  1. Desktop won’t connect. This is a different known bug. Computer use or Desktop works during the initial environment setup, but on later agents it can fail with “Could not connect to Desktop”, just like in your screenshot. It’s being tracked too, and there’s no timeline yet. The Terminal still works during this, so the agent itself keeps running.

@deanrie I have a cloud environment (defined with environment.json & setup.sh) that has bad git state in it. Somehow its main is different from origin/main.

How can I delete/reset the environment snapshot to start over? Everything I’ve tried so far starts from the previous environment (which includes the bad git state), so I’m not able to reset it to be correct.

Hi @deanrie - our org is also experiencing this problem and it makes the dashboard quite noisy on this page. Would be great to get this fixed soon. +1

@jpat thanks for the +1, noted, it helps with prioritization. I don’t have an exact ETA yet, but the request is being tracked.

@TomO your case is a bit different. It’s not about deleting an entry in the dashboard, it’s about rebuilding a snapshot with a broken git state. Right now you can’t reset a snapshot from the UI with a button, that’s a known limitation. A couple workarounds that usually help:

  1. Make any change in environment.json or in setup.sh, then start a new agent. Changes in the env config invalidate the existing snapshot and trigger a full rebuild.
  2. If you don’t want to change the config, add an explicit reset to origin/main in setup.sh:
    git fetch origin
    git reset --hard origin/main
    git clean -fdx
    
    This fixes main vs origin/main drift on every start.

If both options still bring up the agent with the old state, share the agent ID or the Request ID from chat right upper corner of the chat > Copy Request ID, and we’ll take a closer look. It might be worth starting a separate thread for snapshot reset so it doesn’t get mixed with the environment deletion topic.

Thank you Dean. Updating environment.json/setup.sh doesn’t build from a fresh snapshot. It appears to start from an existing snapshot and update it (which carries forward the broken git state).

Aubrey@CursorSupport is looking into this with the team.

@TomO, thanks for coming back with an update. Yep, you’re right. Changing environment.json or setup.sh doesn’t always invalidate the snapshot the way it should, especially if the base layer already has a broken git state. That’s a known limitation. A “run agent without snapshot” or “force rebuild” option is on the backlog, but I can’t share an ETA.

Since Aubrey is already in the thread with the team, let’s not duplicate. Please continue there. If it helps speed things up, send her the agent ID and the Request ID from the latest run right top corner of the chat > Copy Request ID, plus the contents of environment.json, so we can pinpoint why the cache bust didn’t work.

As another workaround while we wait for a fix, you can fully recreate the repo connection. Create a new environment on top of the same repo with a different name or a slightly changed structure. That usually gives you a clean snapshot. It’s a workaround, but it works in most cases.

A similar case with a Dockerfile setup is discussed here, in case it helps: How to force the cloud agent environment to rebuild from scratch when using a Dockerfile