# Can't use dev container + cloud agents reliably

**URL:** <https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867>\
**Category:** Bug Reports\
**Tags:** devcontainers, cloud-agents\
**Created:** [September 7, 2026, 8:28am UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867 "2026-09-07T08:28:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fraggle](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Fraggle](https://forum.cursor.com/u/Fraggle)\
**Post date:** [September 7, 2026, 8:28am UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/1 "2026-09-07T08:28:09Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

When using the dev container extension in the IDE and the cloud agents simulatenously, the IDE disconnect from the dev container.  
Note that the cloud agent and the dev container are using the same container image (not sure it’s relevant).

After digging, I narrowed it down to an interaction between the 2 systems, maybe something related to port forwarding.

### Steps to Reproduce

- Open IDE with dev container, connect successfully.
- Open “Agents” window and click on one of the sessions.  
=\> IDE disconnect from container after a few seconds / minutes.

If I do not open the Agent window (or leave it in the background), the dev container connexion is rock solid.

### Expected Behavior

Beeing able to use both features at the same time.

### Operating System

MacOS

### Version Information

2026-09-02T23:03:07.739Z

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [September 7, 2026, 11:48am UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/5 "2026-09-07T11:48:01Z")

</div>

Hey @Fraggle, thanks for the report!

This is a known issue we’re already tracking, and I’ve added your report to it.

The Agents Window opens its own connection to your dev container, and when you switch it over to a cloud agent session that connection is released. The Dev Containers extension then treats that as “the editor closed” and stops the container about 15 seconds later, which is what knocks your IDE window off it. It isn’t related to the container image or to port forwarding.

As a workaround, you should be able to add `"shutdownAction": "none"` to your `devcontainer.json` (top level), then rebuild or reopen the container once. With that set, Cursor never auto-stops the container when a window or session goes away, so the IDE and the Agents Window can share it. The trade-off is that the container keeps running after you close Cursor until you stop it yourself (`docker stop <name>` or via Docker Desktop).

If you get a chance, one thing that would confirm it on your side: right after the disconnect, run `docker ps -a` on the host. If your dev container shows as `Exited` a few seconds after you clicked the cloud agent session, that’s exactly this issue.

---

<div class="post-metadata">

**Author:** ![Fraggle](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Fraggle](https://forum.cursor.com/u/Fraggle)\
**Post date:** [September 7, 2026, 1:11pm UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/8 "2026-09-07T13:11:04Z")

</div>

Thanks for the quick reply !  
I’ll try disabling shutdownAction.  
That beeing said, in my experience, the container was still running in docker (/orbstack) but it was indeed disconned cleanly from the point of view of cursor (based on logs).

---

<div class="post-metadata">

**Author:** ![Fraggle](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Fraggle](https://forum.cursor.com/u/Fraggle)\
**Post date:** [September 7, 2026, 2:14pm UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/9 "2026-09-07T14:14:06Z")

</div>

So far so good, no deconnexion anymore.

---

<div class="post-metadata">

**Author:** ![Fraggle](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Fraggle](https://forum.cursor.com/u/Fraggle)\
**Post date:** [September 8, 2026, 12:20pm UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/10 "2026-09-08T12:20:44Z")

</div>

@Colin

I think there is another related issue regarding SSH key forwarding in the container.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [September 15, 2026, 1:45pm UTC](https://forum.cursor.com/t/cant-use-dev-container-cloud-agents-reliably/170867/11 "2026-09-15T13:45:10Z")

</div>

Feel free to raise a new thread if needed!
