VS Code Extension: No visible chip / confirmation for active-file context (regression from earlier auto-attach + chip behavior)
Preflight Checklist
- [x] I have searched existing requests
- [x] This is a single feature request
Problem Statement
In earlier versions of the Claude Code VS Code extension, selecting a file in the
Explorer or having it open in the editor attached it as context automatically, and
the file name was displayed as a chip directly in the chat panel. That chip served
two purposes at once: it attached the context, and it gave immediate visual
confirmation of which file the next instruction would apply to.
The current behavior removes that. Selection context only appears as a line count
in the prompt footer, and referencing a file requires an explicit @-mention or
Alt+K. There is no persistent visual indicator in the chat panel showing which file
or folder the conversation is currently targeting.
This is a significant regression for workflows involving many files. In my projects
I work across dozens of markdown and config files with similar names (CLAUDE.md,
prompt.md, grundregeln.md across multiple subfolders). Picking the right target is
the single most error-prone step. Without a visible chip I cannot verify before
sending that Claude is pointed at the file I intend. Fuzzy @-mention matching makes
this worse, not better: partial names match several candidates, and a wrong match is
silent.
The workflow I need is: select the file or folder in the file view, then write the
instruction in chat, and see the target confirmed in the chat panel before I send.
Proposed Solution
Add an extension setting, e.g.:
"claudeCode.autoAttachActiveFile": true // default: current behavior (false)
When enabled:
- The currently active editor file (and, where applicable, the selected Explorer
folder) is attached as context automatically.
- The attached file/folder is rendered as a removable chip in the chat panel, showing
the name and ideally the workspace-relative path on hover.
- The chip can be dismissed per message with an X, as attachments already can.
- Explicit @-mentions, Alt+K, and Shift+drag continue to work unchanged.
Why a Setting, Not a Default Change
Issues #23968, #25179 and #40869 requested the opposite: users with large source
files wanted auto-attach off to save tokens. Both needs are legitimate and they are
not in conflict. A single boolean setting serves both groups. The token-cost argument
does not generalize: for users working across many small files, precision of
targeting matters far more than the tokens saved.
Additional Context
The core request is the visible confirmation, not only the attachment. Even if the
auto-attach default stays as it is today, surfacing the resolved target as a chip in
the chat panel (for @-mentions and selections alike) would recover most of the lost
value. Right now the user has no way to verify the target before sending, and finds
out only after Claude has already acted on the wrong file.
Environment
- Claude Code VS Code extension (graphical panel, not terminal mode)
- VS Code on Windows