[BUG] VS Code extension: active file context not injected when submitting a slash command
Resolved 💬 2 comments Opened Apr 22, 2026 by julie-aevean Closed May 27, 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?
The active file context (ide_opened_file) is not injected into the conversation when a message is a slash command (e.g. /code-review), even after switching to a file in the editor. Claude has no way to know which file is open.
What Should Happen?
The currently open file should be passed as context regardless of whether the message is a slash command or regular typed text.
Error Messages/Logs
Steps to Reproduce
- Open a file in VS Code
- In the Claude Code panel, submit a slash command without any additional text
- Claude does not receive the active file context
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
VS Code extension v2.1.116
Platform
Other
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
File context is correctly injected when the same message includes typed text alongside the slash command. The issue is specific to messages that are slash commands only.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗