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.
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:
CLAUDE.mdandCLAUDE.local.mdfrom the working directory and every directory above it. If the project has noCLAUDE.md, Claude Code readsAGENTS.md.- A
CLAUDE.mdin a subfolder loads later, once the agent reads or edits a file in that subfolder. Rules in.claude/rules/with apathsfield work the same way: a rule forsrc/api/**/*.tsenters context when the agent works on a matching file. - 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.


