File picker '@' shows incorrect relative path with extra '../../' prefix

Resolved 💬 4 comments Opened Feb 3, 2026 by oleg-pavliv Closed Mar 5, 2026

Description

When using the @ file picker to select files, the displayed path incorrectly includes a ../../ prefix, even when the file is within the current working directory.

Steps to Reproduce

  1. Have a git repository with nested directory structure
  2. cd into a subdirectory (e.g., java/household within the repo)
  3. Run claude
  4. Type @ and select a file that exists in the current directory (e.g., src/main/java/com/nagra/ns/rule/model/Rule.java)

Expected Behavior

The file should be shown as:

@src/main/java/com/nagra/ns/rule/model/Rule.java

Actual Behavior

The file is shown with an incorrect ../../ prefix:

@../../src/main/java/com/nagra/ns/rule/model/Rule.java

This resolves to the wrong absolute path.

Environment

  • Working directory: /home/oleg/work/nv-nagrascout/java/household
  • Git repository root: /home/oleg/work/nv-nagrascout (two levels up)
  • Platform: Linux (WSL2)

Possible Cause

The file picker appears to be calculating relative paths from the git repository root instead of the current working directory. The ../../ corresponds exactly to the distance from the working directory to the git root.

Workaround

Manually edit the path after selection to remove the incorrect ../../ prefix.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗