[FEATURE] Add option to disable auto-attach currently open file in VSCode extension
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 using the Claude Code VSCode extension, the currently opened file is automatically attached as context in every chat message.
For large files (e.g., 2000+ line C files in embedded firmware projects), this wastes a significant amount of tokens on every message, even when the question has nothing to do with the current file.
The current workflow requires me to manually click the X on the file chip every time before sending a message. This is repetitive and easy to forget.
Proposed Solution
Add a setting in the VSCode extension (e.g., claude-code.autoAttachOpenFile) that allows users to disable the automatic attachment of the currently opened file.
Options could be:
always(current behavior, default)never(never auto-attach)ask(show the chip but default to hidden/disabled)
This way users who work with large files can opt out of the automatic context inclusion and only use @-mentions or Alt+K when they explicitly want to reference a file.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗