VS Code: Clicking 'I trust this folder' spawns three extra unnecessary windows

Resolved 💬 3 comments Opened Mar 8, 2026 by gcgc6666 Closed Mar 11, 2026

Bug Description

When opening a project in VS Code with the Claude Code extension, after clicking "I trust this folder", three unnecessary VS Code windows are spawned in addition to the original window.

Steps to Reproduce

  1. Open a project folder in VS Code with the Claude Code extension installed
  2. The workspace trust dialog appears
  3. Click "I trust this folder"
  4. Three extra VS Code windows pop up (one with a terminal running claude, others with Claude Code panels)

Expected Behavior

Only the original VS Code window should remain after trusting the folder. No extra windows should be spawned.

Actual Behavior

Three additional VS Code windows are opened, which appear to be redundant instances of Claude Code initialization.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code CLI version: v2.1.68
  • VS Code: Latest stable
  • Claude Code Extension: Latest version from marketplace

Screenshot

The screenshot below shows the original window (left) alongside the three extra windows that were spawned:

(User observed 3 extra windows appearing after clicking "I trust this folder")

Notes

  • The extra windows can be manually closed without affecting functionality
  • This appears to be caused by the extension reinitializing the Claude Code process multiple times after the workspace trust event

View original on GitHub ↗

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