[BUG] VSCode extension has no focus context

Resolved 💬 3 comments Opened Mar 14, 2026 by boycce Closed Apr 21, 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?

There are no state context available similar to terminalFocus to be used in keybindings. view.claudeVSCodeSidebar.active works, but isn't helpful in detectiong if the panel or input is focused.

<img width="744" height="205" alt="Image" src="https://github.com/user-attachments/assets/50808ace-0f8a-4987-9756-63c289d8f2c9" />

What Should Happen?

There should be focus related contexts available to be used in keybindings, e.g.

  • claudeCodeFocus
  • panelFocus (should emit too if Claude is focused in the panel)

Error Messages/Logs

Steps to Reproduce

  1. Add ClaudeCode to the panel
  2. Open ~/Library/Application Support/Cursor/User/keybindings.json
  3. Add the following, which should only toggle closed when in ClaudeCode is focused:
{
      "key": "shift+cmd+c",
      "command": "workbench.action.togglePanel",
      "when": "claudeCodeFocus" // <---should be available
}

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.74 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Cursor

Additional Information

_No response_

View original on GitHub ↗

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