[FEATURE]VS Code extension: no way to disable auto-attachment of active editor file to chat context
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When a file is open in the VS Code editor, the Claude Code extension automatically attaches it to every chat conversation — including unrelated chats and new conversations opened while that file remains active. There is no setting to disable this behavior.
This is disruptive when working across multiple chat tabs on different topics: every conversation gets injected with context from whatever file happens to be open in the editor, regardless of relevance. The only available workaround is manually clicking the file chip in the input bar to exclude it — this must be repeated for every single message.
I verified all 33 Claude-related settings in VS Code — none of them control this behavior.
Proposed Solution
Add a VS Code setting: Claude Code: Auto-attach Active Editor File (boolean, default: true).
When set to false, the active editor file should not be automatically added to chat context. Users would still be able to attach files manually via the + button.
Alternative Solutions
Currently working around it by clicking the eye icon on the file chip before every message to exclude it from context. This is the only available control and it's tedious.
Priority
High - Significant impact on productivity
Feature Category
Performance and speed
Use Case Example
I have test.gs open in the editor/selected/clicked once in the left panel
I open a new Claude chat to ask an unrelated question (e.g., about a different project)
The .gs file is automatically attached to the new chat
I have to manually exclude it before sending
If I switch to another chat tab — same problem repeats
With this setting disabled, none of this would happen. Files would only enter context when I explicitly add them.
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗