remote.extensionKind: ["ui"] causes sidebar restoration error in DevContainer

Resolved 💬 3 comments Opened Mar 26, 2026 by TadashiToriumi Closed Mar 30, 2026

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

  1. Add to .vscode/settings.json or .devcontainer/devcontainer.json:
"remote.extensionKind": {
    "anthropic.claude-code": ["ui"]
}
  1. Open the project in a DevContainer ("Reopen in Container")
  2. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗