[BUG] Windows 版 Computer Use MCP 授权标识与前台进程检测标识不匹配
Open 💬 0 comments Opened Jun 16, 2026 by CYXyouzhi
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?
Windows 版 Computer Use MCP 的授权系统用 bundle ID(如 claude-code-desktop)注册白名单,
但前台进程检测用的是实际 EXE 文件名(如 Claude Code Haha.exe)。两者不匹配,
导致即使已将 Claude Code 加入白名单,只要 Claude Code 窗口在前面,
所有鼠标/键盘操作都会被拒绝。
只有手动切到 Chrome 等其他已授权应用才能正常操作。
What Should Happen?
授权后的应用无论进程名和 bundle ID 是什么关系,只要已加入白名单,
前台检测就应该通过,允许正常操作。
Error Messages/Logs
"Claude Code Haha.exe" is not in the allowed applications and is currently in front. Take a new screenshot — it may have appeared since your last one.
Steps to Reproduce
- Windows 11,Claude Code 桌面版
- 调用 request_access 授权 Claude Code(bundle ID: claude-code-desktop)
- 确认白名单已有 Claude Code(list_granted_applications 可见 claude-code-desktop)
- 把 Claude Code 窗口切到最前面
- 调用任何操作,如 mouse_move [100, 100]
- 报错被拒绝
- 切换窗口到 Google Chrome 后再试,操作正常
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
0.4.2
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
修复建议:前台进程检测和白名单匹配统一用同一个标识体系。Windows 没有 macOS 的统一 bundle ID 机制,建议用 GetWindowThreadProcessId + 进程名匹配。