Extension removed from devcontainer.json still reinstalls every time continer is rebuilt

Describe the Bug

I have a project with a VSCode DevContainer setup that used to have “bmewburn.vscode-intelephense-client” in the “extensions” node of devcontainer.json. I removed that entry, and replaced it with “devsense.phptools-vscode”. Now whenever I restart the container both exensions are installed, I have to manually uninstall intelephense every time the container is rebuilt.

Steps to Reproduce

Start with a vscode devcontainer setup that has an extension specified in the extensions node, verify that when rebuilding the container, the extension is installed. Now replace the extension with a different one and rebuild the container. Navigate to the original extensions markeplace page in the extensions panel, and see that it is installed (For me the extension does not show in the locally installed extensions list, I have to go to its marketplace page). Manually uninstall it. Rebuild the container and again navigate to the extensions marketplace page and see that it has been reinstalled.

Expected Behavior

Once removed the extension should remain removed every time the container is rebuilt.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:59:43.242Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.6.97-1-MANJARO

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @Prismo , thank you for this bug report. To confirm, were you rebuilding the container or simply restarting it? It would be helpful if you could share a screencast for this issue so we can take a closer look – we were unable to reproduce it.

Hi @ravirahman, thanks for your assistance. Rebuilding the container. Please see the attached screen recording.

Hi @Prismo, could you share your docker-compose.yml file? It is likely that this extension is coming from the extensions bundled inside the image metadata. The mcr.microsoft.com/devcontainers/php image includes this extension by default: images/src/php/.devcontainer/devcontainer.json at 394d07c4a9ec0be46403ec97906646e0cefcfbde · devcontainers/images · GitHub

Could you try adding -bmewburn.vscode-intelephense-client to your extensions list to ensure it is excluded? In addition, note that extensions will need to go inside the customizations.vscode.extensions section – see Developing inside a Container.

Thanks @ravirahman, you are correct, opting out of the extension solves the issue. My apologies for making this your problem, I was unaware that the container images could also contain an extension specification. Thanks for your assistance.