VSCode plugin + CLI sharing ~/.claude/settings.json causes failures on Windows

Resolved 💬 1 comment Opened May 20, 2026 by SHGuoLei-AI Closed Jun 19, 2026

Describe the bug

When both Claude Code CLI and the VS Code Claude Code extension are installed on the same Windows 11 machine, they share ~/.claude/settings.json. This appears to cause state/permission conflicts that break core functionality in the VS Code extension environment.

Environment

  • Platform: Windows 11 Home (10.0.26100)
  • Claude Code Version: 2.1.143 (CLI), VS Code extension (same channel, latest)
  • VS Code Version: latest stable
  • Git: 2.54.0.windows.1
  • Shell: bash (via VS Code integrated terminal)

Symptoms

  1. Cannot launch processes from extension: npm run dev fails inside VS Code extension but works perfectly in PowerShell. Electron crashes with TypeError: Cannot read properties of undefined.
  2. Cannot open browser: gh auth login --web quietly fails, no browser window opens.
  3. Cannot open files via code command: Results in SyntaxError trying to execute the file as JavaScript.
  4. Cannot launch debug sessions: Debug-related functionality completely non-functional.

Key observation

On another machine with ONLY the VS Code extension installed (no CLI), everything works normally.

The ~/.claude/settings.json on the problematic machine has extensive permission allowlists (accumulated from CLI usage) that the extension then tries to interpret, possibly leading to permission mismatch or sandboxing issues.

Steps to reproduce

  1. On Windows 11, install Claude Code CLI (npm install -g @anthropic-ai/claude-code)
  2. Install the VS Code Claude Code extension
  3. Use CLI extensively (many permission grants accumulate in settings.json)
  4. Try to run npm run dev, gh auth login --web, or code <file> from within the VS Code extension

Expected behavior

CLI and extension should either use separate config files, or sharing should not cause any functional differences between the two environments.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗