[BUG] @ path autocomplete broken in v2.0.72 when running from git subdirectory
Resolved 💬 31 comments Opened Dec 18, 2025 by jxonas Closed May 5, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In v2.0.72, the @ file path autocomplete adds incorrect ../ prefix when running inside a Docker container from a git subdirectory that has its own .claude/ folder. Works correctly on the host and in v2.0.71.
What Should Happen?
@docs/file.md should resolve relative to the working directory containing .claude/, not require @../docs/file.md.
Error Messages/Logs
Steps to Reproduce
Unable to create minimal reproduction. Issue occurs with this setup:
- Git repo structure:
/path/to/repo/ <- git root
/path/to/repo/subdir/ <- contains .claude/ folder
/path/to/repo/subdir/docs/
- Docker container with:
- Volume: -v '/path/to/repo:/path/to/repo'
- Workdir: -w '/path/to/repo/subdir'
- Claude Code v2.0.72
- Run
claude, type@docs/- suggests@../docs/instead
Environment details:
- Works: v2.0.71 in container, v2.0.72 on host
- Breaks: v2.0.72 in container only
- Linux host, eclipse-temurin:25-jdk-noble base image
- User mapped with matching UID/GID
Workaround: Pin to v2.0.71
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.71
Claude Code Version
2.0.72
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
31 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I am also seeing this, steps to repro:
This autocompletes to
@../../Dockerfile.I have same problem.
The same problem for me:
searching for
@Dockerfilein the current dir, but it shows me that it's in the parent dir:> @../Dockerfilethis is not a docker container. it's a host.
$ claude -v
2.0.73 (Claude Code)
Linux Fedora
Still a problem in 2.0.74 =/
This issue also exist in MacOS.
This issue still exists in recent version of claude code (mac silicon)
Having the same issue on MacOS, m3 pro, 2.0.74 in VSCode
I'm also experiencing this (ubuntu). It's very frustrating. Based on other similar bug reports, it's likely related to the location of the
.gitfolder, regardless of DockerStill happening on 2.1.1
its hardcore that this bug lasted until minor patch.... 2.1.2 still have same issue
wtf how is this still not fixed? I'm beginning to think the vast majority of claude code users don't use @ references.
I think this should definitely get fixed. As a temporary fix, you can use a custom
fileSuggestioncommand to override the default behaviour:Then in the claude JSON config:
@claude please fix
Don't want to spam, just in case my previous comment is not clear for some people, I also wrote a lengthier explanation of setting up a custom
fileSuggestioncommand here.This is driving me crazy. Please fix it as soon as possible.
Still happening in v2.1.12 Ubuntu 24.04; most annoying, thus the annoying me too comment escalating a thumbs-up.
Still happening in Claude Code 2.1.14, Fedora Linux. Using the Opus model Claude wants to search, using Sonnet it prepends but still finds the file without searching. However, repeated testing in the same session may be caching.
Still an issue in v2.1.15, I just wasted an hour trying to figure out why all paths were broken until I stumbled upon this issue.
Reproduced on Linux (Ubuntu 22.04), Claude Code 2.1.17
I'm agree with @jxonas that the issue is about git repo root.
It should be a setting at least: home directory is a git repo root, or a claude project root (where .claude is located) or a current directory. It's useful for monorepo
i think a quick fix is just to
git initon the root folder, somehow claude code is probably using information from.gitfor the file search auto complete feature.suppose we have the following:
the current bug occurs when each of the subdirectories have their own .git and you are running claude code in
company-repos.The fix is just to
git initincompany-reposI still have this issue with CC v2.1.20, for me it happens in any simple git repo like this
git-project/
├── subdir
Starting CC in subdir yields incorrect file completions starting with ../ this used to work in Claude 2.072
Same here. Bug still exists in 2.1.23.
Still an issue in 2.1.29
Time to pop the champagne corks, I think this is now fixed in 2.1.34
The issue is still happening for me in 2.1.34
chiming in to say it started happening to me with latest update...I had no issues before, the only thing I did was some tinkering with project files since I moved stuff around, I ave a hunch I might have broken claude's indexing nightmare setup and this is why these things are happening, will try to clean install claude code again and see if the problem persists, if so I think that the issue isn't in the executable but in the
~/.claude/config filesis issue still happen on 2.1.40 too?
Is this still happening for people?
yes its still happening :(
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.