[Feature Request] Add settings to disable auto-attaching active editor file and selection by default
Summary: The VS Code extension automatically attaches the currently open editor file (and current text selection) as context on every prompt. There is currently no way to turn this off by default — it can only be suppressed per-message (clicking × on the chip, or the eye-slash selection toggle), which resets each turn.
Request: A persistent setting to default auto-context to off, ideally with separate toggles:
- disable auto-attach of active editor file
- disable auto-share of current selection
- Configurable via the extension settings panel and/or settings.json (e.g. claudeCode.autoAttachActiveFile: false).
Why: I often want to control context explicitly via @-mentions rather than have the open file injected automatically. Reasons include: avoiding leaking unrelated/open files into the prompt, keeping context lean, and prompting about something other than the file I happen to be viewing. The existing Read(...) deny-rule workaround is per-path and also blocks Claude from reading those files when I do want it to — so it's not a substitute.
Current workaround: Per-message × on the chip / eye-slash toggle, or Read deny rules for specific sensitive paths. Neither provides a global default-off.
<img width="711" height="126" alt="Image" src="https://github.com/user-attachments/assets/53ad2c95-aec4-4e13-8592-ad3625428304" />
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗