[Bug] Terminal mode opens 3 extra VS Code windows on launch (Windows)

Resolved 💬 3 comments Opened Mar 5, 2026 by TZJeanFlores Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the Claude Code VS Code extension in terminal mode (claudeCode.useTerminal: true), launching Claude Code opens 3
additional VS Code windows/environments, not just terminal tabs. This does not occur when using the native graphic UI mode
(claudeCode.useTerminal: false).

3 additional VS Code environments open alongside the intended one.

What Should Happen?

Claude Code should launch in the current VS Code window only. No additional VS Code windows should open.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Install Claude Code VS Code extension v2.1.69
  2. Set claudeCode.useTerminal to true in VS Code settings
  3. Open VS Code (single folder or multi-root workspace — both affected)
  4. Launch Claude Code from the command palette or sidebar
  5. Observe 3 extra VS Code windows/environments opening

Expected Behavior

Claude Code should launch in the current VS Code window only. No additional VS Code windows should open.

Actual Behavior

3 additional VS Code environments open alongside the intended one.

Environment

  • OS: Windows 11 Enterprise 10.0.26100
  • VS Code: Latest stable
  • Extension version: anthropic.claude-code v2.1.69 (win32-x64)
  • Shell: Git Bash
  • Terminal mode: claudeCode.useTerminal: true
  • Preferred location: claudeCode.preferredLocation: "panel"

Troubleshooting Done

  • No custom shell init files (.bashrc, .bash_profile, .profile) exist
  • System-level bash config (/etc/profile, /etc/bash.bashrc) are stock Git Bash defaults
  • VS Code terminal profiles are standard — no duplicates
  • Tested with single-folder workspace — same behavior (not related to multi-root)
  • Cleared ~/.claude/ide/*.lock files and restarted — issue persists
  • Extension activates via onStartupFinished event, which may trigger the launch logic multiple times

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.69

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Troubleshooting Done

  • No custom shell init files (.bashrc, .bash_profile, .profile) exist
  • System-level bash config (/etc/profile, /etc/bash.bashrc) are stock Git Bash defaults
  • VS Code terminal profiles are standard — no duplicates
  • Tested with single-folder workspace — same behavior (not related to multi-root)
  • Cleared ~/.claude/ide/*.lock files and restarted — issue persists
  • Extension activates via onStartupFinished event, which may trigger the launch logic multiple times

Workaround

Setting claudeCode.useTerminal to false (using the native graphic UI) avoids the issue entirely.

View original on GitHub ↗

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