[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

  1. Install VS Code on macOS
  2. Install the Claude Code extension
  3. Open Claude Code panel (via Cmd+Shift+Escape or clicking the icon)
  4. Click on a file in the editor to move focus away from Claude Code
  5. Press Cmd+Escape to try to focus back to Claude Code
  6. 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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗