[FEATURE] Limit @ file picker scope to working directory in monorepo

Resolved 💬 2 comments Opened Apr 29, 2026 by xiaohp Closed May 30, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When working inside a monorepo, launching Claude Code from a subdirectory (e.g., apps/app-product) does not limit the @ file picker scope to that directory. Instead, the picker searches and displays matches from the entire git repository root, which includes all other applications in the monorepo.

This creates significant noise during development: when I type @ to reference a file, results from unrelated sibling apps appear alongside the files I actually want, making it hard to quickly locate the right file.

The current behavior is inconsistent with the expectation that launching Claude Code from a subdirectory should scope its context to that directory.

Proposed Solution

The @ file picker should default to searching from the working directory where Claude Code was launched, not the git repository root.

Ideally:

  • When Claude is launched from apps/app-product, the @ picker should only show files under that directory by default.
  • Optionally, a configuration setting (e.g., filePickerRoot in settings.json) could allow users to explicitly override this scope.
  • Alternatively, a CLI flag like --scope-to-cwd could enforce this behavior when needed.

Alternative Solutions

  • Typing a more specific path prefix after @ (e.g., @src/pages/) helps narrow results, but still shows matches from other apps if the path pattern overlaps.
  • Adding deny permission rules in .claude/settings.json blocks file access from other apps, but does not affect what appears in the @ picker UI.
  • No current workaround fully solves the problem without manual effort on every file reference.

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

  1. I have a monorepo with 7+ frontend applications under apps/.
  2. I launch Claude Code from apps/app-product to work on a

single app.

  1. I type @index in the prompt to reference a page file.
  2. The picker returns matches from app-bidding/src/pages/index.tsx,

micro-goods/src/pages/index.tsx, and other unrelated apps.

  1. I have to manually scan the list and identify the correct file, defeating

the purpose of the picker.

With this feature, only files under apps/app-product would
appear, making the picker fast and accurate.

Additional Context

This is a common pain point in monorepo setups where multiple applications share a single git root. Tools like VS Code handle this by allowing users to open a subfolder as the "workspace root," effectively scoping all file operations to that directory. A similar concept in Claude Code would greatly improve the developer experience for monorepo users.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗