[BUG] VSCode: ide_selection and ide_opened_file missing on first message when using a skill
Resolved 💬 5 comments Opened Mar 13, 2026 by dorian-marchal Closed May 28, 2026
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 both tags.
<img width="500" alt="Image" src="https://github.com/user-attachments/assets/1cc1322a-67b3-4beb-a804-7faf101159dd" />
What Should Happen?
ide_selection and ide_opened_file should be included in the skill's first message.
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_selectionoride_opened_filein context - Send a follow-up:
and now? - Claude now correctly sees both
ide_selectionandide_opened_file
Environment
- VSCode extension
- Claude Code Version: 2.1.74
- Platform: Anthropic API
- Operating System: macOS
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
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗