[BUG] `claude-vscode.focus` command throws error when Claude Code panel is already open
Resolved 💬 1 comment Opened Dec 31, 2025 by liby Closed Dec 31, 2025
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?
claude-vscode.focus command throws an error when the Claude Code panel is already open.
When pressing Cmd+Escape with the Claude Code panel already visible, VS Code logs show:
+ Invoking command claude-vscode.focus.
[error] [Window] An unknown error occurred. Please consult the log for more details.
The command is invoked correctly but fails silently. Instead of focusing the existing panel, it opens a new tab.
What Should Happen?
Pressing Cmd+Escape when Claude Code panel is already open should focus the input field in the existing panel, not throw an error or open a new tab.
Error Messages/Logs
+ Invoking command claude-vscode.focus.
[error] [Window] An unknown error occurred. Please consult the log for more details.
(From VS Code's Keyboard Shortcuts Troubleshooting log)
Steps to Reproduce
- Install VS Code on macOS
- Install the Claude Code extension
- Open Claude Code panel (via
Cmd+Shift+Escapeor clicking the icon) - Click on a file in the editor to move focus away from Claude Code
- Press
Cmd+Escapeto try to focus back to Claude Code - Observe that an error occurs and a new tab opens instead of focusing the existing panel
Claude Model
Claude Opus 4
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.75
Platform
Anthropic API
Operating System
macOS Tahoe (26.2)
Terminal/Shell
N/A
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗