[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

  1. Create a custom skill in .claude/skills/my-skill.md
  2. Open a file in the editor (e.g. src/index.ts)
  3. Select some lines — UI shows </> N lines selected
  4. Send: /my-skill do you have access to the selected lines?
  5. Claude responds that it has no ide_selection or ide_opened_file in context
  6. Send a follow-up: and now?
  7. Claude now correctly sees both ide_selection and ide_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

View original on GitHub ↗

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