claude-code - 💡(How to fix) Fix @ file picker: file paths not shown in search results, making disambiguation hard [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51892Fetched 2026-04-23 07:42:06
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

When using the @ file reference utility to attach a file to a message, the search results show only the filename without the directory path. This makes it impossible to distinguish between files that share the same name across different subdirectories.

Root Cause

When using the @ file reference utility to attach a file to a message, the search results show only the filename without the directory path. This makes it impossible to distinguish between files that share the same name across different subdirectories.

Fix Action

Workaround

Typing part of the parent directory path (e.g. plans/api/endpoints) in the search query does surface path context in results — but this requires the user to already know the path, defeating the purpose of the search.

RAW_BUFFERClick to expand / collapse

Summary

When using the @ file reference utility to attach a file to a message, the search results show only the filename without the directory path. This makes it impossible to distinguish between files that share the same name across different subdirectories.

Steps to Reproduce

  1. Open Claude Code in VSCode
  2. In the message input, type @ followed by a filename that exists in multiple locations (e.g. endpoints.md, README.md, index.ts)
  3. Observe the search results dropdown

Expected Behavior

Each result in the dropdown should display the full relative path (or at minimum the parent directory) alongside the filename — e.g.:

  • plans/api/endpoints.md
  • docs/endpoints.md

Actual Behavior

Only the bare filename is shown (e.g. endpoints.md), with no path context. When multiple files share a name, the user cannot tell which one to select.

Workaround

Typing part of the parent directory path (e.g. plans/api/endpoints) in the search query does surface path context in results — but this requires the user to already know the path, defeating the purpose of the search.

Environment

  • Claude Code VSCode Extension
  • macOS

Request

Show the relative file path in the @ picker results for every entry, not just the filename. A common pattern (used by VS Code's own Quick Open, Telescope in Neovim, etc.) is to show the filename prominently with the path dimmed beneath or to the right.

extent analysis

TL;DR

Modify the @ file reference utility to display the full relative path alongside the filename in search results.

Guidance

  • Review the implementation of the @ file reference utility to determine why it's only showing filenames without directory paths.
  • Consider modifying the search results dropdown to display the full relative path or at least the parent directory for each file.
  • Investigate how other code editors like VS Code's Quick Open or Telescope in Neovim handle similar file searches and path displays for inspiration.
  • Evaluate the feasibility of adding a feature to dim or secondary-display the path information to prioritize the filename, as suggested in the issue.

Example

No specific code example can be provided without more context on the implementation, but a potential display format could be: endpoints.md (plans/api).

Notes

The solution may require changes to the search query handling or result formatting within the Claude Code VSCode Extension. The exact implementation details are not provided in the issue, so further investigation is needed.

Recommendation

Apply a workaround or modification to the @ file reference utility to display relative paths, as upgrading to a fixed version is not mentioned as an option in the issue. This is because the issue explicitly requests a change to the current behavior, implying a modification is necessary.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING