Describe the Bug
I have this "postAttachCommand": "docker compose logs -f --tail=10",
in my devcontainer.json
file which until today, using the ms dev containers extension, would execute after Cursor attaches to the dev container and opens the log in a terminal.
Cursor was bugging me to install the Anysphere Dev Containers extension, which I did, as I believe this is or will eventually be required as Anysphere has rebuilt their own version of this and other MS extensions and has deprecated (or will) the MS versions.
But after installing the Anysphere Dev Containers extension, Cursor NEVER attaches to the container. It gets stuck FOREVER on Setting up Dev Container (details): Starting Dev Containers...
If I click on details
I see that my container is running and I see the expected logging output. It seems that Cursor is waiting for the postAttachCommand
to return before it considers the dev container to be started, and it never shows me the container file system in the explorer bar and it wonβt allow me to open a terminal, etc.
If I comment out this postAttachCommand
, Cursor is able to attach to the dev container and I am able to see my container file system and open terminals.
Steps to Reproduce
Add "postAttachCommand": "docker compose logs -f --tail=10",
to devcontainer.json
with a dev container that has docker installed in the container and the docker socket bind mounted into the container.
Or perhaps add any other postAttachCommand
that does not return (e.g. sleep infinity
).
Expected Behavior
Cursor should execute postAttachCommand
AFTER it has attached to the dev container, and should open a terminal to show me the output of the postAttachCommand
, like the MS extension did.
Operating System
MacOS
Current Cursor Version (Menu β About Cursor β Copy)
Version: 1.2.0
VSCode Version: 1.99.3
Commit: eb5fa4768da0747b79dc34f0b79ab20dbf582020
Date: 2025-07-01T19:49:10.821Z (1 day ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0