[BUG] @ file picker does not show untracked files in git repositories (regression)
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?
The @ file picker dropdown shows directories and the plan option but no files when files are untracked in a git repository. Previously, untracked files were visible in the @ file picker. Only upon running git add on files, they appear in the picker as expected.
This is a regression — the @ picker used to show all files in the project directory regardless of git tracking status. Now it appears to rely exclusively on git ls-files, which excludes untracked files.
- Note: I haven't upgrade any version of Claude Code, it failed to execute somehow, no idea.
- Related: #26464
What Should Happen?
The @ file picker should show all files in the project directory, including untracked files, as it did in earlier versions.
Error Messages/Logs
Haven't seen any logs via live debugging
1. # Trace what Claude Code is doing when you type @
strace -f -e trace=read,write,openat -p $(pgrep -f claude) 2>/tmp/claude-strace.log &
2. # Then type @ in Claude Code, wait a few seconds, then:
kill %1
grep -i "rg\|ripgrep\|git.*ls-files\|file" /tmp/claude-strace.log | head -40
3. Nothing show up
Steps to Reproduce
- Create a git repo with untracked files:
bash
mkdir /tmp/test-repo && cd /tmp/test-repo
git init
echo "hello" > test.txt
echo "world" > another.txt
# Do NOT git add or commit
- Start Claude Code: claude
- Type
@— dropdown shows directories only, no files - Type
@test.txt— no autocomplete suggestion - Exit Claude Code
- Run git add . and git commit -m "track files"
- Start Claude Code again: claude
- Type @ — files now appear in the dropdown
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.85 (native install)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗