Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesClaude Code & Agentic DevelopmentHow Claude Code Reads a Codebase
Claude Code terminal: the claude -p command with Read and Edit allowedRetries after a 429 error: each pause is twice as long, then successText cut into overlapping chunks, the top three lifted into results
Course

Claude Code & Agentic Development

Module 1 · Getting Started
01Installation and First Session02How Claude Code Reads a Codebase03An Effective CLAUDE.md
Module 2 · Daily Workflows
04Slash Commands and Custom Commands05Breaking Features into Tasks06Claude Code and git07Agentic Debugging
Module 3 · Power Features
08MCP Servers in Claude Code09IDE Integration10Advanced Patterns
Claude Code & Agentic Development · Lesson 2

How Claude Code Reads a Codebase

How the agent loads CLAUDE.md and AGENTS.md, finds files with Glob and Grep, what .gitignore really does, how to narrow scope with permission rules, and how to keep context lean with the Explore subagent and /context.

20 min readUpdated Nov 9, 20264 questions in quizReady prompt included

What the agent sees at start

At launch Claude Code loads the project's instructions into context. It reads code later, as the task needs it:

  1. CLAUDE.md and CLAUDE.local.md from the working directory and every directory above it. If the project has no CLAUDE.md, Claude Code reads AGENTS.md.
  2. A CLAUDE.md in a subfolder loads later, once the agent reads or edits a file in that subfolder. Rules in .claude/rules/ with a paths field work the same way: a rule for src/api/**/*.ts enters context when the agent works on a matching file.
  3. The agent finds code with the Glob tool (by file name) and the Grep tool (by content), then opens with Read only what relates to your request.

So in a giant monorepo, context goes to the files the task actually needs.

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
What the agent sees at startWhat .gitignore really doesAsking about architectureReading multiple files at onceNarrowing scope: permission rulesThe Explore subagent for researchWatching context: /contextLarge repositories in practiceWhy this mattersPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free