VS Code extension: no opt-out for IDE context sharing (opened files, selections)
Resolved 💬 1 comment Opened Jun 16, 2026 by ScrewTSW Closed Jun 16, 2026
Problem
The Claude Code VS Code extension automatically sends the currently opened file name and any highlighted text selection to the API as part of the system prompt context (ide_opened_file and ide_selection tags). There is no setting to disable this behavior.
If a user has a sensitive or personal document open in another editor tab while interacting with Claude Code, the filename and selection content are silently transmitted without explicit consent.
Steps to reproduce
- Open a personal or sensitive file in a VS Code tab (medical notes, personal journal, private correspondence, etc.)
- Switch to the Claude Code panel in another tab
- Send any message to Claude
- The system prompt automatically includes
<ide_opened_file>with the filename and<ide_selection>with any highlighted text from the other tab
Expected behavior
There should be a setting to disable automatic IDE context sharing. Users should be able to opt out of sharing editor state with the API entirely.
For example:
{
"claudeCode.sendEditorContext": false
}
Or more granular options:
{
"claudeCode.sendOpenedFileName": false,
"claudeCode.sendEditorSelection": false
}
Why this matters
- Users may have sensitive documents open (medical, legal, personal, financial) while using Claude Code for development work in the same editor window
- The context is sent unconditionally. There is no consent prompt, no visual indicator, and no setting to disable it
- The
DISABLE_TELEMETRYandDO_NOT_TRACKenvironment variables do not affect this, as it is part of the core API request, not telemetry - Users in regulated industries or with strict personal privacy requirements have no way to prevent this data from being transmitted
Environment
- Claude Code extension version: 2.1.159
- IDE: VSCodium (also affects VS Code)
- OS: Linux
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗