[BUG] VSCode: ide_selection and ide_opened_file missing on first message when using a skill
Open 💬 0 comments Opened Jun 12, 2026 by mattwilliamsfigs
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?
Re-opening this issue since it still seems to be happening.
Bug
When invoking a skill (slash command) in the VSCode extension, ide_selection and ide_opened_file context tags are not included in the first message, even though the UI shows lines selected and a file is open.
Sending a follow-up message correctly includes tag.
<img width="500" alt="Image" src="https://github.com/user-attachments/assets/d55f168d-940a-4925-a83f-ade5d31d4fe5" />
What Should Happen?
ide_selection and ide_opened_file should be included in the skill's first response.
Error Messages/Logs
Steps to Reproduce
- Create a custom skill in .claude/skills/my-skill.md
- Open a file in the editor (e.g. src/index.ts)
- Select some lines — UI shows </> N lines selected
- Send: /my-skill do you have access to the selected lines?
- Claude responds that it has no ide_selection or ide_opened_file in context
- Send a follow-up: and now?
- Claude now correctly sees both ide_selection and ide_opened_file
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.175
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_