In short.
This configuration guide helps developers and engineering teams focus Claude Code on relevant parts of large repositories, but several settings behave differently when sessions start inside packages or move into worktrees. Its strongest practical contribution is explaining how instructions, file access and checked-out directories interact. It supplies concrete examples and important limitations, including gaps in read-denial coverage. Token savings, performance improvements and compatibility with particular Claude Code releases are not established.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete captured page at [https://code.claude.com/docs/en/large-codebases.md], including its configuration examples, combined setup, warnings and organizational guidance. Linked documentation, repositories, marketplace contents, pricing and separate legal terms are excluded. No commands, installations, configurations, performance measurements or end-to-end development tasks were executed; runtime behavior and quantified benefits remain unverified.
The overview
Identity
The resource is a Claude Code documentation guide at [https://code.claude.com/docs/en/large-codebases.md]. It teaches configuration for both monorepos containing multiple packages and large repositories divided into subsystems.
Its running example contains API, web and shared packages. The configurations are instructional examples to adapt to a repository, rather than a standalone tool or installable configuration bundle.
Assessment
The guide is useful when Claude Code spends context on unrelated conventions or reads too much of a repository to locate relevant code. It connects specific problems to individual controls, allowing developers to adopt only the settings their repository needs.
Its most valuable detail is the distinction between instruction loading, file permissions and worktree contents. Those mechanisms solve different problems. The documentation explains their interaction, but provides no measured evidence that its configuration improves task accuracy, completion time or token consumption.
Users
Individual developers can use package-level launches and local settings to focus their own sessions. Package owners can maintain conventions beside their code. Teams responsible for shared developer tooling can use the sections on managed settings, plugins and centralized conventions.
The same approach applies to a large single-tree repository by substituting subsystem directories for package directories. Readers need enough familiarity with repository paths, JSON configuration and Git to adapt the examples; the page does not teach those fundamentals.
Capabilities
The guide covers nested CLAUDE.md files, claudeMdExcludes, Read deny rules, language-server plugins, sparse worktrees, dependency-directory symlinks, additional directory access and per-directory skills. These address instruction relevance, file-reading overhead and checkout size.
For larger teams, it also describes moving shared procedures into versioned plugins, exposing an existing code-search service through MCP, and using a SessionStart hook to recommend an area's plugin. These organizational patterns are outlined rather than supplied as complete implementations.
Using it
Requirements
The instructions assume an existing Claude Code installation and the ability to create or edit repository configuration. Worktree examples require Git. The page does not establish a minimum Claude Code version, account requirement or complete operating-system compatibility matrix.
Code intelligence requires the appropriate language-server binary on each developer's machine. Installing the official plugin marketplace requires access to GitHub; the guide points to internal Git hosting or local marketplace paths for restricted networks. Enabling a plugin in project settings does not install it for each teammate.
Sparse worktrees require Git to enable extensions.worktreeConfig in the shared repository configuration. The documentation says Claude Code removes that entry after the last worktree is removed only if Claude Code originally added it.
Mechanism
CLAUDE.md files supply instructions to the assistant. At launch, Claude Code loads the working directory's file and its ancestors; files below that directory load on demand. Project .claude/settings.json files do not inherit from parent directories in the same way.
Instruction exclusions and file restrictions operate separately. claudeMdExcludes prevents matching instruction files from loading, while permissions.deny restricts supported file-reading operations. Language-server plugins let Claude jump to definitions, find references and surface type errors, reducing the need for broad file searches.
worktree.sparsePaths controls which directories appear in a new worktree, alongside root-level files. additionalDirectories and --add-dir grant access outside the starting directory, but instruction discovery differs: additionalDirectories loads neither instructions nor skills, while --add-dir loads skills and can load instructions when CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 is set.
Setup
First choose the usual launch directory. Starting at the repository root suits changes across packages; starting inside a package limits default file access to that subtree while still loading ancestor CLAUDE.md files. Put shared conventions in the root CLAUDE.md and area-specific conventions beside the relevant code.
Place project settings in the directory whose settings the session reads. Use .claude/settings.local.json for personal configuration, and ignore it in Git when creating it manually. The page says repository-root local settings normally load across CLI launch directories, with exceptions where Claude Code does not use the repository root, such as on Windows; the full list is in linked documentation. Relative Read patterns still resolve from the session's working directory.
Configure sparse paths before creating a worktree. Include the root .claude directory if its settings and rules are needed there. After creation, the working directory becomes the worktree root, so settings needed during worktree sessions must be available in the root .claude/settings.json.
Example
For an API change that also touches shared types, the guide starts Claude Code in packages/api/. Root and API CLAUDE.md instructions load at launch. Setting permissions.additionalDirectories to ../shared in the API package's settings grants access to shared code, but does not load that directory's instructions or skills.
The example sets worktree.sparsePaths to .claude, packages/api and packages/shared. It places Read deny rules for build output in the API settings for direct package sessions, and repeats those rules in the repository-root settings for worktree sessions. Root-level files such as lockfiles remain present in the sparse checkout.
This is a documented configuration example. Its behavior, dependency completeness and suitability for a particular repository have not been tested.
Assessment & evidence
Limitations
Read deny rules are not a complete barrier against every way of opening files. The page explicitly excludes subprocesses that open files themselves, describes Grep and Glob filtering as best effort, and warns that recursive Bash searches can still return denied files.
Exclusion lists are static rather than task-specific. Exclusion arrays merge across settings scopes, and managed CLAUDE.md files cannot be excluded. Sparse-path lists also merge, so a personal configuration can add paths but cannot remove committed ones.
All worktrees in a session share the same sparse-path list, so if different subagents need different directories (for example packages/api and packages/web), all of them must be listed, which widens every worktree's checkout. Skills discovered across many directories can accumulate; skill names always load, but when there are many skills some lose their descriptions entirely, which can remove the keywords used to choose them.
Symlinked dependencies point back to the main checkout's copy, so that directory is shared. The page does not demonstrate how this arrangement behaves with a particular build system or package manager.
Reasoning
A sensible starting point is the launch directory because it determines both the initial access scope and which configuration files matter. Adding settings before resolving that choice can put correct configuration in a file the session never reads.
For localized work, package-level launches and concise local conventions offer a relatively direct configuration. Cross-package changes need deliberate sibling access and any required instruction loading. Worktree users additionally need root-level settings because the session changes directory after worktree creation.
These recommendations follow from the documented loading rules. Whether they produce better results or lower costs depends on the repository and task; no comparative trials are supplied.
Alternatives
Within Claude Code, path-scoped rules under the root .claude/rules directory are an alternative to placing CLAUDE.md files beside each subsystem. The guide suggests centralized rules when conventions apply to scattered paths, and per-directory files when directory owners maintain their own instructions.
Skills provide procedures that load when relevant. Versioned plugins can centralize conventions across repositories. An MCP connection to an existing code-search or retrieval service offers another route to finding relevant code.
These are alternatives described on the same page. Linked documentation and competing coding assistants are outside the available evidence, so feature parity, relative cost and comparative effectiveness are unknown.
Evidence
The evidence is the complete captured documentation page at [https://code.claude.com/docs/en/large-codebases.md]. It includes configuration examples, loading rules, caveats and references to related documentation.
The page establishes what the documentation describes, rather than independently verified runtime behavior. No commands were executed, no plugins were installed, and no configurations or repository journeys were tested. Linked pages were not assessed.
Access & freshness
Costs
The page gives no Claude Code prices, subscription requirements or expected cost per task. It argues that irrelevant instructions and file reads consume tokens, but supplies no before-and-after usage figures. Actual monetary savings are unknown.
Sparse worktrees are described as reducing checkout time and disk use, while symlinkDirectories avoids copying selected directories into each worktree. No timing or storage measurements are provided. The effort required to maintain instructions, plugins, language servers and optional telemetry is not quantified.
Rights
The supplied page does not state a license or redistribution terms for its text and configuration examples. Reuse rights are therefore unknown from this evidence.
Claude Code service terms and the licenses of language-server plugins or binaries are not included. The guide's technical instructions do not establish those separate permissions.
Freshness
The available page snapshot was captured on 15 November 2026 at 03:10:55 UTC. That is a capture time, not an established publication or last-update date.
The page supplies no Claude Code release number or compatibility history for the described settings. Support in a particular installed release, and changes after the capture time, are unknown.
Actions
Begin with one representative package or subsystem. Choose its launch directory, separate repository-wide conventions from local ones, and use /context all to inspect the loaded memory files.
Before relying on the configuration, verify which settings file the session reads, whether sibling instructions and skills are available, and whether a sparse checkout contains the dependencies needed for the task. Check worktree sessions separately because they start at the worktree root.
Treat Read deny rules according to their documented coverage, including subprocess and recursive-search limitations. Measure token usage, worktree size and task outcomes in your own repository before expecting savings or expanding the configuration across a team.
