An agent built on the Claude Agent SDK inherits a project the same way Claude Code does: by reading files. This is every one of them, and the option that decides how many your agent sees.
./Project scope. Commit it and your team gets it.~/.claude/User scope. The same files, in every project you open.SETTING SOURCES
"project"- ./.claude/, CLAUDE.md, rules, skills, commands, subagents
"user"- ~/.claude/ — the same set, in every project
"local"- CLAUDE.local.md and settings.local.json
All three load when you omit the option. Passing settingSources: [] disables the user, project, and local settings sources. Managed policies, global configuration, and auto memory may still load independently.
WHEN TWO FILES SET THE SAME KEY
- managed
- command line
- project local
- shared project
- user
your-project/Standing instructions
01 / 10- CLAUDE.md is loaded at the start of every session: project overview, stack, conventions, architecture.
- CLAUDE.local.md holds your own notes for this project. You create it yourself and add it to .gitignore.
- AGENTS.md is read in place of CLAUDE.md when your repository already keeps one for other coding agents.
In the SDKThe SDK loads CLAUDE.md under the "project" setting source and CLAUDE.local.md under "local". To inject context without any file, pass systemPrompt instead.