[BUG] Flaky VS Code IDE integration — selected code context intermittently not detected

Resolved 💬 3 comments Opened Feb 13, 2026 by marcospgp Closed Mar 14, 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?

The IDE integration with VS Code is flaky. /ide detects VS Code, but the connection is unreliable:

  • Selected code context is sometimes not passed to Claude
  • IDE features intermittently stop working (e.g. diff view, file navigation)
  • Restarting VS Code or Claude Code sometimes fixes it, sometimes doesn't

This was previously reported in #10428 which was auto-closed by the stale bot despite active human comments, then locked. Multiple users confirmed the issue there.

What Should Happen?

Once VS Code is detected, the IDE integration should work reliably — selected code context should always be available, and IDE features should not randomly drop.

Steps to Reproduce

  1. Open VS Code with the Claude Code extension installed
  2. Run claude in the VS Code integrated terminal
  3. Run /ide — VS Code is detected
  4. Select code in the editor and reference it in a prompt
  5. Sometimes the selected code context is not picked up
  6. The behavior is intermittent and hard to reproduce deterministically — sometimes it works, sometimes it doesn't within the same session

Is this a regression?

I don't know

Claude Code Version

2.1.41 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

  • macOS 26.2 (Darwin 25.2.0)
  • Original issue: #10428 — auto-closed and locked by stale bot despite human activity. See also #16497 (meta-issue about the bot incorrectly closing active issues).

View original on GitHub ↗

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