[FEATURE] VS Code extension: @ file mention dropdown should list files open in editor tabs first
Preflight Checklist
- [x] This is a single feature request (not multiple features)
- [x] Searched existing requests: the only match is #64907, which the automation closed for inactivity and then locked — see Prior Art below. A new issue is the only way to re-raise it.
Problem Statement
When typing @ in the Claude Code VS Code extension composer, the autocomplete dropdown lists workspace files in a generic order (path/alphabetical). Files that are currently open in VS Code editor tabs get no priority and no marker — even though the extension already knows which files are open (it receives ide_opened_file / selection context).
Concrete pain: in a project with many identically named files (src/utils/index.ts, src/components/index.ts, src/services/index.ts), I have to scan the whole list and read full paths to pick the one that is literally open in front of me. VS Code's own Ctrl+P quick open surfaces already-open/edited files first; the @ dropdown does not. When the file is already open, it is the most likely candidate for a reference, and the dropdown gives no signal about that.
Proposed Solution
- Pin open files to the top — files with an open tab in the current VS Code window appear before all other workspace files in the
@dropdown. - Keep MRU order inside that group — the most recently active tab first, same as Ctrl+P.
- Visual marker — a small tab icon / "open" badge so open files stay identifiable even among same-name entries.
- Change ordering only, not filtering — once the user types, matching stays as it is; open-status only decides the order between candidates and never hides files. No new setting required (an opt-out would be fine, but the default should be the useful one).
Scope: the @ file mention dropdown in the VS Code extension only. If the same list is shared with other surfaces, that is out of scope for this request.
Alternative Solutions
- Explicit modifier (
@open:/@tab:) restricting suggestions to open files — gives control, but adds discoverability and cognitive overhead compared to plain reordering. - Fuzzy relevance scoring with open-status as one signal among recency/frequency/proximity — more sophisticated, but less predictable than a visible "open files first" group.
- Disambiguation submenu when several files share a name — addresses the symptom (same-name ambiguity) rather than the ordering itself.
Current workaround: type more of the path, or Ctrl+P in VS Code to find the path, then type it out manually.
Priority
Medium - Would be very helpful
Feature Category
File operations
Use Case Example
- A project with several
index.ts/page.tsx/route.ts/types.tsin different folders. - I open the two files I am actually working on in editor tabs.
- I type
@plus a couple of letters; the dropdown shows same-named entries from unrelated folders first, and the intended file sits somewhere below with an identical name. - With this change, the tab I am working in would be the first entry and I would just press Enter instead of reading paths.
- Effect: a few seconds saved per reference, dozens of times a day in a large repo.
Prior Art (why a new issue)
- #64907 — "[FEATURE] Prioritize open/editor files in @ file reference autocomplete suggestions" (opened 2026-06-03 by @1m188): essentially the same request — open tabs first, MRU order within the group, optional "open" indicator, explicit Ctrl+P parity.
- It was closed on 2026-07-07 by
github-actions[bot]with "Closing for now — inactive for too long" (state_reason: not_planned), with zero comments or reactions from the Claude Code team, and auto-locked 7 days later — so it cannot be reopened or commented on. The idea was never actually assessed; it died on a timer, not on merit. - Re-filing it: the change is small, well-scoped, and the extension already has the data (open-file context). It also removes friction that currently pushes users toward manually attaching context that the tool already knows.
Additional Context
- VS Code parity for the proposed ordering: Ctrl+P quick open ranks open/edited files first.
- The data already exists in the extension:
ide_opened_file/ide_selectioncontext is part of the IDE integration (see #8451 for those fields, and #68838 / #24726 / #62179 for the separate discussion about sharing or auto-attaching the active file). This request is only about the ordering of suggestions, not about attaching anything to the conversation.