[Bug] Unsafe window detection logic runs when VS Code is not active

Resolved 💬 3 comments Opened May 12, 2026 by lotuseater Closed May 16, 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?

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:

  1. Ask Claude to open fresh session of Claude and give it a prompt.
  2. 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

View original on GitHub ↗

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