claude-code - 💡(How to fix) Fix [Bug] Unsafe window detection logic runs when VS Code is not active

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Bug Description Claude in cli: "Listing windows first to find a safe target (must not touch the VS Code I'm running in).". While VS Code is closed.

Environment Info

Platform: win32 Terminal: windows-terminal Version: 2.1.136 Feedback ID: 882ae0be-425a-49d2-9dfb-f3ca231ada62

What Should Happen?

Claude either should detect environment it is running in, or at least not make wrong assumptions.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude in cli.
  2. Ask Claude to to operations with Windows automation - dab - say minimize or close other windows.
  3. Claude assumes it is in VS Code Alternative:
  4. Ask Claude to open fresh session of Claude and give it a prompt.
  5. Claude opens VS Code.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.136

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

That is not exactly a duplicate. Other existing (but for strange reason closed by bot) bug - https://github.com/anthropics/claude-code/issues/42900. - That is about Android Studio, not cli. Anyway, the bug is still there and unpleasant

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Unsafe window detection logic runs when VS Code is not active