[BUG] Claude VS extension No ide_selection context but existent selected file/line
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?
After the VS Code extension auto-updated to v2.1.278, get_current_selection stops returning any editor context. The active file path never appears in the prompt box, and selecting text never shows the ⧉ Selected N lines indicator. This happens in every workspace/project, not just one repo. It was working correctly before the update.
What Should Happen?
Description
After the VS Code extension auto-updated to v2.1.278, get_current_selection stops returning any editor context. The active file path never appears in the prompt box, and selecting text never shows the ⧉ Selected N lines indicator. This happens in every workspace/project, not just one repo. It was working correctly before the update.
Environment
- Claude Code VS Code extension: v2.1.278 (installed 2026-09-21, published 2026-09-19)
- VS Code: 1.138.0 (Electron 42.10.0)
- OS: macOS (Darwin arm64 25.6.0)
- Workspace: fully local (no SSH/WSL/Dev Container/Codespaces)
- "Attach Open File" setting: enabled
Steps to reproduce
- Open any project in VS Code with the Claude Code extension installed.
- Open a file and place the cursor in it, or select some text.
- Open/focus the Claude Code panel and send a message.
Expected behavior
- The active file path shows in the prompt box.
- Selecting text shows
⧉ Selected N lines from <file>in the transcript.
Actual behavior
- No file path is ever shown, with or without a text selection.
- The extension log (
Claude VSCode.log) shows the webview sending aget_current_selectionrequest on session init (confirming the webview↔extension-host request path fires normally), but no active file/selection context is ever attached to messages. Option+K(insert file/line mention) does not open the file-mention picker either — it's intercepted by macOS as the dead-key composition for "˚" instead, suggesting the extension isn't registering/handling the keybinding or editor focus context correctly post-update.
Troubleshooting already tried (no effect)
- Reloaded the VS Code window (
Developer: Reload Window) - Confirmed "Attach Open File" setting is enabled
- Checked extension Output panel — no errors logged
- Confirmed VS Code (1.138.0) and extension (2.1.278) versions are both above the documented minimums (1.94.0 / 2.1.271)
- Checked
~/.claude/settings.json,~/.claude/settings.local.json, and VS Codesettings.jsonfor permission deny rules or overrides — none found - Reproduces in every project, not workspace-specific
Additional notes
The extension folder timestamp (~/.vscode/extensions/anthropic.claude-code-2.1.278-darwin-arm64) shows the auto-update landed the same day this regression appeared, strongly suggesting it's tied to the v2.1.278 release specifically.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
Open any project in VS Code with the Claude Code extension installed.
Open a file and place the cursor in it, or select some text.
Open/focus the Claude Code panel and send a message.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.205
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_