Hey @ravirahman,
Thank you once again for the fast response 
First about my “problematic” devcontainer setup:
I have a complex development environment with a main docker-compose.yml file that defines multiple application services:
project-root/
├── .devcontainer/
│ ├── docker-compose.yml
│ ├── app-0/ # Individual devcontainer configs
│ ├── app-1/
│ ├── legacy-app-0/
│ ├── legacy-app-1/
│ └── [... more services referencing the compose.yml in their own `devcontainer.json`]
└── [application code directories...] (e.g. legacy-app-0, legacy-app-1, app-0)
The Issue
Each subdirectory in .devcontainer/ contains its own .devcontainer.json that typically references a specific service from the main docker-compose.yml using something like:
{
"dockerComposeFile": "../docker-compose.yml",
"service": "legacy-app-0",
"workspaceFolder": "/project-root/legacy-app-0"
}
The Problem I’m Experiencing
When I open a container which in turn opens in one of the project-root subdirectories, Cursor doesn’t detect or properly use the .devcontainer
configuration which now may reside in it`s parent repository, VSCode somehow used to work and remember the location of the .devcontainer folder (which now resides in its parent directory). If I have a service that also is present in the project-root it obviously finds it, but if the container opens in the application code directory it is unable to.
To the SSH-Key config
I am using Windows 11 with Docker installed locally, leveraging the WSL2 engine. Most of my Git repositories are cloned into WSL, opened there with Cursor, and then reopened in their specific devcontainers. I’ve noticed that, for some devcontainers, the SSH keys are successfully transferred because the SSH agent is detected. However, for the problematic setup I described, the SSH keys are not being passed, and the agent cannot be found.
→ After further testing and rebuilding the containers (without cache) where SSH key passing previously worked, I discovered that SSH key passing using SSH_AUTH_SOCK fails for all containers opened via Cursor. This happens despite my WSL terminal confirming that SSH_AUTH_SOCK is correctly set. I also followed the process for SSH key passing in PowerShell as a precaution, but that did not resolve the issue either.