remote.extensionKind: ["ui"] causes sidebar restoration error in DevContainer
Description
When using the Claude Code VS Code extension with a DevContainer, setting remote.extensionKind to ["ui"] (to run the extension on the host side and preserve Max plan authentication) causes the sidebar to fail to load.
Steps to reproduce
- Add to
.vscode/settings.jsonor.devcontainer/devcontainer.json:
"remote.extensionKind": {
"anthropic.claude-code": ["ui"]
}
- Open the project in a DevContainer ("Reopen in Container")
- Claude Code sidebar fails to load
Error message
view:claudeVSCodeSidebarSecondary を復元中にエラーが発生しました
(Translation: "Error occurred while restoring view:claudeVSCodeSidebarSecondary")
Expected behavior
The Claude Code extension should run on the host (UI) side and maintain the existing Max plan authentication when connected to a DevContainer.
Workaround
Instead of using remote.extensionKind, we install the Claude Code CLI inside the DevContainer and mount ~/.claude from the host:
// devcontainer.json
"mounts": [
"source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached"
]
Combined with RUN pnpm add -g @anthropic-ai/claude-code in the Dockerfile, the extension picks up the Max plan authentication from the mounted ~/.claude directory.
Environment
- VS Code: Latest
- Claude Code extension: v2.1.84
- OS: macOS (Apple Silicon)
- DevContainer base image:
mcr.microsoft.com/devcontainers/base:ubuntu-24.04
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗