How Claude Code works in large codebases: Best practices and where to start

· ai coding databases · Source ↗

TLDR

  • Anthropic documents the harness patterns behind successful Claude Code deployments in monorepos, legacy systems, and multi-repo distributed architectures at enterprise scale.

Key Takeaways

  • The five extension points are CLAUDE.md files, hooks, skills, plugins, and MCP servers; build them in order since each layer depends on the prior one.
  • Claude Code uses agentic file-system traversal and grep rather than RAG-based embedding indexes, avoiding stale-retrieval failures common in large active codebases.
  • CLAUDE.md files should be lean and layered: root file for critical gotchas only, subdirectory files for local conventions; bloat degrades session performance.
  • LSP integrations give Claude symbol-level navigation (go-to-definition, find-all-references) and are described as the highest-value investment for C, C++, and multi-language codebases.
  • Subagents split exploration from editing: a read-only subagent maps a subsystem and writes findings to a file, then the main agent edits with full context.

Hacker News Comment Review

  • Commenters question what success actually means here: no clear metrics like velocity improvement or TTL are defined, and the timeline for “clear patterns” to emerge in a fast-moving space draws skepticism.
  • The claim that RAG-based indexing fails at scale is disputed; commenters note JetBrains IDEs (e.g., PHPStorm) handle codebase indexing reliably, suggesting the framing overstates the weakness.
  • Some commenters suspect enterprise deployments use a version of Claude Code unconstrained by subscription cost-optimization, and note practitioner sentiment has shifted toward Codex for large codebases.

Notable Comments

  • @wood_spirit: Wants detailed walkthroughs of the actual tool-call and grep decision loop: “you don’t really see the jumps it’s making offscreen.”
  • @weird-eye-issue: Notes the full API request including system prompt, tools, and tool calls is inspectable directly.

Original | Discuss on HN