What this thread does
Do first: create a short CLAUDE.md in each subdirectory you work in (root file: pointers and critical gotchas only), put that directory's test and lint commands in it, and start Claude Code from the subdirectory instead of the repo root. Anthropic article
Not for: diagnosing compaction thresholds in a 1M-context Claude Code session (see claude-code-compacts-near-400k-on-1m-model-keep-full-1m).
Short answer
Anthropic's article says Claude Code navigates a codebase like an engineer: it traverses the file system, reads files and uses grep, and needs no codebase index built, maintained or uploaded. Anthropic article That goes best when Claude has enough starting context, so navigation quality depends on layered CLAUDE.md files and skills. Anthropic article The article names five extension points (CLAUDE.md files, hooks, skills, plugins, MCP servers) plus LSP integrations and subagents. Anthropic article
Choose / don't choose
| Move | Choose it when | Not for |
|---|---|---|
Layered CLAUDE.md | Each service or directory has its own conventions. Claude walks up the tree and loads every CLAUDE.md it finds. Anthropic article | Putting everything in one root file, which the article says drifts into noise |
| Per-subdirectory test and lint commands | Services have separate build and test commands. Anthropic article | Compiled monorepos with deep cross-directory dependencies, where the article says scoping is harder |
permissions.deny in .claude/settings.json | You want generated files, build artifacts and third-party code excluded for the whole team. Anthropic article | Developers who work on code generators: an allow rule in another settings scope cannot override a deny, so they must change the deny list itself Permissions |
| LSP code intelligence plugin | Grep on a common name returns thousands of matches. Anthropic article | Languages without a language server binary installed |
| Read-only subagent | You want a subsystem mapped before editing starts. Anthropic article | Small edits in one file |
| Codebase map file | Directory structure does not explain where code lives. Anthropic article | Repos with a conventional layout |
Settings that matter
| Item | Behavior | Source |
|---|---|---|
Root CLAUDE.md | Pointers and critical gotchas only | Anthropic article |
Subdirectory CLAUDE.md | Local conventions and the commands that apply to that part | Anthropic article |
.claude/settings.json permissions.deny | Committed exclusions shared by every developer | Anthropic article |
| Skills scoped to paths | A deployment skill can be bound to the directory of the team that owns it | Anthropic article |
| Plugin | Bundles skills, hooks and MCP configurations into one installable package | Anthropic article |
| Review cadence | A meaningful configuration review every three to six months | Anthropic article |
Order of operations
1. Add a short CLAUDE.md per subdirectory, with that part's test and lint commands, and keep the root file to pointers and critical gotchas. Anthropic article 2. Start sessions in the subdirectory you are changing. Anthropic article 3. Commit permissions.deny rules for generated files, build artifacts and third-party code. Anthropic article 4. Install a code intelligence plugin and its language server binary so Claude can search by symbol. Anthropic article 5. For unfamiliar subsystems, have a read-only subagent write findings to a file, then let the main agent edit. Anthropic article
Known failures and fixes
- Full test suite runs for a one-service change and times out: scope the commands in the subdirectory
CLAUDE.md. Anthropic article - Claude opens the wrong function with a common name: add the LSP plugin. Anthropic article
- Old rules hurt a newer model: the article gives a rule that forces single-file refactors as an example and recommends reviewing
CLAUDE.md, skills and hooks after major model releases. Anthropic article - A hook that intercepted writes for
p4 editbecame redundant once Claude Code added native Perforce mode. Anthropic article - Deny rules seem not to apply from a subdirectory: one user reported that a project
permissions.denyRead rule was enforced from the repo root but not from a subdirectory (Claude Code v2.1.220; closed as inactive with no maintainer comment, so unconfirmed, checked 2026-12-04). After committing deny rules, try reading a denied path from the directory you start in. Issue
Missing
- No measured speed or accuracy numbers are given for these patterns.
- The article leaves out codebases with hundreds of thousands of folders and non-git version control; it says later installments will cover them.
- Exact plugin names per language are in the Claude Code docs, not here.
Evidence
Anthropic article "How Claude Code works in large codebases" on claude.com, whose page metadata gives the publication date 2026-05-14, and the Claude Code permissions docs, read 2026-12-04. Independent report: serdarcida reported in claude-code issue 84318 on 2026-08-05 that project permissions.deny Read rules were "silently not enforced when the session is launched from a subdirectory"; the issue was closed on 2026-10-05 as inactive and was never confirmed by a maintainer (checked 2026-12-04). 0 trials in this draft; not tried by WhatWorks.
Checked
2026-12-04; the article was read on that date.
Started from a post by @Anthropic, packaged by the editor. Original post