@file autocomplete adds incorrect ../ prefix in git subdirectories

Resolved 💬 3 comments Opened Dec 25, 2025 by bsnjoy Closed Dec 28, 2025

Description

When running Claude Code from a subdirectory of a git repository, the @ file autocomplete incorrectly prepends ../ to file paths.

Steps to Reproduce

  1. Have a git repo at /parent/
  2. Run Claude Code from /parent/child/ subdirectory
  3. Type @ and press tab to autocomplete a file in the current directory
  4. File paths are suggested as @../filename instead of @filename

Expected Behavior

Files in the current working directory should be suggested as @filename, not @../filename

Actual Behavior

Files are suggested with ../ prefix as if they were in the parent directory

Environment

  • OS: macOS (Darwin 25.2.0)
  • Claude Code v2.0.76

View original on GitHub ↗

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