vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Dev Containers: add command to reinstall/sync extensions from devcontainer.json in the current container

Open jgoedeke opened this issue 7 months ago • 3 comments

When using Dev Containers, VS Code installs extensions declared in devcontainer.json under customizations.vscode.extensions.

In practice, these installs can occasionally fail during container creation or rebuild, for example because of transient network/download issues. When that happens, the container can be left in a partially configured state, and I have not found a way to explicitly retry installing the extensions declared in devcontainer.json for the current container.

At the moment, the only workaround I know is to rebuild/reopen the container again and hope the extension installation succeeds on the next attempt.

Requested feature

Please add a command to re-run extension installation for the current container based on the contents of devcontainer.json, for example:

  • Dev Containers: Reinstall Extensions from devcontainer.json
  • Dev Containers: Sync Container Extensions with devcontainer.json

Expected behavior

The command should:

  • read customizations.vscode.extensions from the active devcontainer.json
  • detect which declared extensions are missing in the current container
  • retry installation of missing and/or previously failed extensions
  • provide visible progress and error reporting

Why this would help

This would provide a lightweight recovery path for cases where extension installation fails transiently, without requiring a full rebuild of the container.

It would also help when extension installation failures are easy to miss and only become apparent later, after the container is already up and in use.

Nice-to-haves

Possible enhancements:

  • show which declared extensions are already installed vs missing
  • offer “retry failed installs only”
  • surface failed installs more prominently instead of failing silently
  • optionally prompt to re-sync when VS Code detects declared extensions are missing from the connected container

Current workaround

Rebuild/reopen the dev container again to trigger extension installation another time.

Additional context

This request is specifically about reapplying the extensions declared in devcontainer.json to an already created/currently connected container, without needing a full rebuild.

jgoedeke avatar Apr 09 '26 11:04 jgoedeke

Yes. I need this as well. very frustrating to rebuild the containers each time. Especcialy if I am running multiple devcontainers in my microservice arch i get to reload the vs window for the others if one dev containers fails to install the extensions due to network issue. This can trigger a waterfall efect where one faild extension in dev container make other reload and fail the installation of extensions in the others if network faills. I am running in a corporate environment so things like network fails happen frequently

cristiangabor avatar Apr 24 '26 11:04 cristiangabor

is any plan to work on this ? can i assist somehow?

cristiangabor avatar Jun 10 '26 10:06 cristiangabor

Does removing ~/.vscode-server/data/Machine/.installExtensionsMarker and reloading (not rebuilding) help?

jankapte avatar Oct 12 '26 16:10 jankapte