[BUG] VS Code Extension cannot detect files in subdirectories of large codebases
Resolved 💬 3 comments Opened Nov 27, 2025 by Divyanshubansaldb Closed Nov 30, 2025
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 Claude Code VS Code extension can see files in the root directory of large codebases, but cannot detect or access files located in subdirectories. This only occurs with larger projects - smaller codebases work fine.
Observed behavior:
- Terminal-based Claude Code (CLI) can see all files including subdirectories perfectly
- VS Code Extension shows root files but subdirectory contents are invisible via the
@symbol or file browse - This suggests the issue is specific to the Extension's indexing/workspace traversal
Example structure where bug occurs:
my-large-repo/
├── root-file.py ← visible and accessible ✓
├── apps/
│ └── backend/ ← NOT visible ✗
│ └── src/
│ └── main.py
├── packages/
│ └── utils/ ← NOT visible ✗
│ └── helpers.js
└── node_modules/ (large folder that may choke indexer)
What Should Happen?
The VS Code Extension should be able to see and access all files in subdirectories of the workspace, matching the behavior of the Terminal/CLI version. The extension should:
- Properly index subdirectories even in large monorepos
- Make files accessible via the
@mention feature - Allow browsing and selecting files from nested folders in the UI
- Maintain parity with the CLI tool's file visibility across all workspace paths
Error Messages/Logs
Steps to Reproduce
- Open a large monorepo/codebase in VS Code (e.g., with multiple top-level folders like
apps/,packages/,services/, or withnode_modules/) - Open the Claude Code Extension panel on the right side
- Try to find files from subdirectories using the
@mention feature - only root files appear - Compare this with the CLI: Run
claudein terminal from the repo root and try/workspaceor list files - all subdirectories are visible - Observe: CLI sees all files, but VS Code Extension UI shows only root-level files
Workaround observed:
- Opening VS Code on a specific subfolder (e.g.,
code apps/backend) makes the extension see files correctly (extension treats that subfolder as the root)
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
1.0.x or higher (latest)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Root Cause Analysis
This appears to be due to the VS Code Extension's workspace indexing strategy:
- CLI vs Extension difference: The CLI indexes files on-demand as needed, while the Extension pre-indexes the workspace upfront
- Large codebase limits: The Extension likely has a hard cap on file count or indexing depth to prevent VS Code crashes
- Likely culprits: Presence of large
node_modules/,dist/,build/, or generated code folders in the monorepo causes the indexer to hit its limits before reaching subdirectories
Impact
- Severely limits Extension usability in large projects (common in production environments)
- Creates workflow friction: users must switch to CLI for large repos, defeating the purpose of the UI extension
- Inconsistent behavior between CLI and UI is confusing
Related observations
- Smaller projects work fine (no size constraint hit)
- Workaround of opening VS Code on specific subfolders works but is not scalable
- This likely affects any monorepo with significant file count
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗