claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] File suggestions with @ stopped working for large directories after update

Open LuanGarrido opened this issue 11 months ago • 4 comments

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?

Description

After updating Claude Code to the latest version, the @ file suggestion feature stopped working for large directories. Previously, it worked correctly for all directories in my workspace.

What Should Happen?

File suggestions should work for all directories, as it did before the update.

Error Messages/Logs


Steps to Reproduce

  1. Have a workspace with multiple directories of varying sizes
  2. Update Claude Code to latest version
  3. Try to use @ to navigate to files in a large directory

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Environment

  • OS: Windows 11
  • Claude Code Version: (current latest - updated on 2024-12-30)
  • Previous behavior: Working correctly before today's update

Additional Context

  • This is a regression - the same workspace and directories worked correctly before the update
  • The large directory contains an Angular project with typical structure (src/, node_modules/ excluded via .claudeignore)
  • .claudeignore is configured to exclude node_modules/, dist/, .git/, etc.

LuanGarrido avatar Dec 30 '25 15:12 LuanGarrido

I'm experiencing a similar problem on Linux (Ubuntu 24) with Claude Code v2.0.76.

My specific symptoms:

  • Started Claude Code from the correct working directory (/home/kevin/journal/agents/dist)
  • When I ask Claude Code what its working directory is, it correctly reports /home/kevin/journal/agents/dist
  • However, when I use @ to reference files, the autocomplete shows files from completely unrelated directories like /home/kevin/.claude/skills/ instead of files from my current working directory
  • Files that definitely exist in the current directory (like a files/ folder) don't appear in the @ autocomplete at all
  • Using @files command shows no suggestions for the local files/ directory

Workaround that works: Typing full absolute paths with @ does work (e.g., @/home/kevin/journal/agents/dist/files/example.txt) Referencing files directly without @ also works (e.g., ./files/example.txt)

Additional context: The @ file picker appears to be indexing/searching from the wrong location entirely - not just failing to index the current directory, but actively showing suggestions from system directories that have nothing to do with my project.

Andrewske avatar Dec 30 '25 18:12 Andrewske

I'm experiencing a similar problem on Linux (Ubuntu 24) with Claude Code v2.0.76.

My specific symptoms:

  • Started Claude Code from the correct working directory (/home/kevin/journal/agents/dist)
  • When I ask Claude Code what its working directory is, it correctly reports /home/kevin/journal/agents/dist
  • However, when I use @ to reference files, the autocomplete shows files from completely unrelated directories like /home/kevin/.claude/skills/ instead of files from my current working directory
  • Files that definitely exist in the current directory (like a files/ folder) don't appear in the @ autocomplete at all
  • Using @files command shows no suggestions for the local files/ directory

Workaround that works: Typing full absolute paths with @ does work (e.g., @/home/kevin/journal/agents/dist/files/example.txt) Referencing files directly without @ also works (e.g., ./files/example.txt)

Additional context: The @ file picker appears to be indexing/searching from the wrong location entirely - not just failing to index the current directory, but actively showing suggestions from system directories that have nothing to do with my project.

I'm getting this same issue. The file selection list is providing incorrect paths. Claude Code CLI then fails to find the file with an error and then has to search for the file. This worked perfectly in previous versions.

EDIT: When asking Claude itself for help on this, it's most unhelpful. It suggests absolute paths, but I cannot get them to work as the CLI keeps auto "correcting" to the wrong path. Additionally, once I finally drill down into my project, the file picker is not showing any of the sub-directories under my main project/working directory. Again, this is something that worked fine previously.

EDIT2: Asking Claude itself to try to diagnose settings or permissions issue, this was its response: ● Found no configuration issues. The file picker bug appears to be in the CLI UI itself - nothing in your settings or project configs would cause it.

For your bug report, include:

  • Version: 2.0.76
  • Directories exist with correct permissions (drwxr-xr-x)
  • No .claudeignore or ignore patterns
  • Settings.json is clean
  • File picker shows no subdirectories under any working directory

This is a regression in the UI component, not a config issue. No setting to fix it on your end.

mshirey avatar Dec 30 '25 19:12 mshirey

I’m experiencing a similar file resolution / @ navigation issue on Windows, in Claude Code v2.0.76.

What I see

When I start Claude Code inside a directory that’s part of a Git repo, file suggestions with @ produce the incorrect relative path.

Example structure:

root
 ├ .git
 └ dir1    (tracked by git)
     └ file1

From inside dir1:

claude .

Claude correctly reports the working directory, showing the full and correct absolute path to dir1, but when typing:

@file1

Claude suggests:

..\file1

which is wrong — it points outside the current working directory.

When it works

If I remove the .git folder before launching Claude Code (so it’s no longer inside a git repo), then @file1 correctly resolves to:

file1

Summary

This appears related to how file suggestions / path resolution behave when the working directory is inside a Git repository — the presence of .git seems to influence how Claude computes the relative path.

Green7 avatar Jan 07 '26 17:01 Green7

I'm also experiencing this, both in ubuntu and macOS an it's very frustrating. Seems to be the same problem as #14399

ricardo-eai avatar Jan 07 '26 21:01 ricardo-eai

Experiencing the issues on mac, as well. Instead of opening one specific for mac, will add details here:

Bug Description The @ autocomplete seems to be broken - here are the details:

Include these details:

  • iTerm2 on macOS
  • / and ? autocomplete work fine
  • @ autocomplete doesn't appear at all
  • macOS version: Darwin 25.2.0

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.76
  • Feedback ID: 8984623d-ac9c-4d59-8fc9-fb872a4061ee

Errors

[{"error":"Error: Request was aborted.\n    at _createMessage (/$bunfs/root/claude:458:3157)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-09T16:59:14.938Z"}]

idarthjedi avatar Jan 09 '26 17:01 idarthjedi

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Feb 09 '26 10:02 github-actions[bot]

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 23 '26 22:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 03 '26 14:03 github-actions[bot]