[BUG] VS Code extension: @-mention file indexing only sees root-level files, not subdirectories (ECONNREFUSED on local indexing service)

Status Open
Reported on v2.1.221
Maintainer reply None cached
Activity 0 comments · opened Aug 4, 2026

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 @-mention file search in the VS Code extension does not index subdirectories at all — it only returns files located directly in the workspace root. Folders and their contents (even ones tracked by git and visible in the Explorer) are completely invisible to the @-mention search, both via fuzzy name search and via full absolute path.

What Should Happen?

@-mention should recursively index and surface files inside subdirectories, not just root-level files.

Error Messages/Logs

From View → Output → Extension Host:
2026-08-03 12:00:32.665 [error] Error: connect ECONNREFUSED 127.0.0.1:60391
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1706:16)
This error appears repeatedly across sessions, including after full uninstall/reinstall. Verified the port is not occupied by another process (lsof -i :60391 returns nothing), so this doesn't appear to be a port conflict — the extension's own local indexing service seems to be failing to start or bind correctly.
Also present in the logs (possibly unrelated, but noting for completeness):
2026-08-03 11:50:28.249 [error] Error: chatParticipant must be declared in package.json: claude-code
    at UVt.$registerAgent (...)

Steps to Reproduce

  1. Open a multi-folder monorepo workspace in VS Code (in my case ~40+ subfolders under platform/app/)
  2. Open the Claude Code sidebar chat
  3. Type @ followed by a subfolder name (e.g. @platform/app) or even just @ at the workspace root
  4. Search returns "No files found" for subfolder paths
  5. Typing @newbos/ (workspace root) only returns the 4 files literally sitting in the root (.gitignore, README.md, etc.) — every subdirectory is missing from results, despite being visible in the Explorer

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.221

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

VSC Version: 1.131.0 (Universal)
Workspace: single-root, large monorepo (~40+ service subfolders under one directory)
Workaround Currently in Use:
Using the Claude Code CLI directly (claude, launched via native installer at ~/.local/bin/claude) from the terminal, cd-ed into the target subfolder. This works correctly and sees all files/folders as expected — confirming the issue is isolated to the VS Code extension's local indexing/search service, not the underlying Claude Code engine itself.
Troubleshooting Already Done:

  • Confirmed .gitmodules doesn't exist, git submodule status returns nothing
  • Confirmed there is not a symlink (ls -la shows a regular directory)
  • Confirmed files are tracked by git: git ls-files platform/app returns the expected file list
  • Confirmed nothing is excluded via .gitignore: git check-ignore -v dir1/dir2 returns nothing
  • Confirmed no .claudeignore file exists anywhere in the repo
  • Confirmed folder is not excluded via VS Code files.exclude / search.exclude settings
  • Tried absolute path directly (@/Users/xxx/path/to/my/dir) — still "No files found"
  • Tried Shift+drag from Explorer into chat — no effect
  • Fully uninstalled the extension, closed VS Code, waited >1 min, reopened, reinstalled — same behavior persists
  • Reloaded window (Developer: Reload Window) — no change

View original on GitHub ↗