[Feature Request] Add settings to disable auto-attaching active editor file and selection by default · Issue #63925 · anthropics/claude-code · GitHub
//voltron/issues_fragments/issue_layout" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
//voltron/issues_fragments/issue_layout;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading. Please reload this page.
anthropics
claude-code
Public
Notifications<br>You must be signed in to change notification settings
Fork<br>22.5k
Star<br>140k
[Feature Request] Add settings to disable auto-attaching active editor file and selection by default #63925
New issue<br>Copy link
New issue<br>Copy link
Open
Open<br>[Feature Request] Add settings to disable auto-attaching active editor file and selection by default#63925
Copy link
Labels<br>area:ideenhancementNew feature or requestNew feature or requestplatform:vscodeIssue specifically occurs in VS CodeIssue specifically occurs in VS Code
Description
Kallinteris-Andreas<br>opened on May 30, 2026
Issue body actions
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.
Reactions are currently unavailable
Metadata<br>Metadata<br>Assignees
No one assigned
Labels
area:ideenhancementNew feature or requestNew feature or requestplatform:vscodeIssue specifically occurs in VS CodeIssue specifically occurs in VS Code
Type
No type
Projects
No projects
Milestone
No milestone
Relationships
None yet
Development
No branches or pull requests
Issue actions<br>Open in GitHub Copilot app
You can’t perform that action at this time.