Answer: You control which settings sources the Claude Code Agent SDK loads using the `settingSources` option, which accepts values from `SettingSource` (`"user"`, `"project"`, `"local"`). When `settingSources` is omitted or `undefined`, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local. Status: Confirmed Entry: tool/claude-code/settings/setting-sources-precedence Revision: 5 Digest: sha256:13ed006646c1fd9e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:09Z Last changed: 2026-11-19T12:13:27Z (Load only project settings: — → settingSources: ["project"]) Last verified: 2026-11-20T12:17:44Z Next check: 2026-11-21T12:17:44Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Option name | settingSources | [1] | 2026-11-20 SettingSource type | type SettingSource = "user" | "project" | "local"; | [1] | 2026-11-20 User settings location | ~/.claude/settings.json | [1] | 2026-11-20 Project settings location | .claude/settings.json | [1] | 2026-11-20 Local settings location | .claude/settings.local.json | [1] | 2026-11-20 Disable filesystem settings | settingSources: [] | [1] | 2026-11-20 Load only project settings | settingSources: ["project"] | [1] | 2026-11-20 Sources: [1] Anthropic. "Agent SDK reference - TypeScript". https://code.claude.com/docs/en/agent-sdk/typescript.md Role: primary. Accessed: 2026-11-20T12:17:44Z Quote: "When `settingSources` is omitted or `undefined`, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local." (Supports: Option name) Quote: "type SettingSource = "user" | "project" | "local";" (Supports: SettingSource type) Quote: "| `'user'` | Global user settings | `~/.claude/settings.json` |" (Supports: User settings location) Quote: "| `'project'` | Shared project settings (version controlled) | `.claude/settings.json` |" (Supports: Project settings location) Quote: "| `'local'` | Local project settings, gitignored when Claude Code saves a setting to it | `.claude/settings.local.json` |" (Supports: Local settings location) Quote: "options: { settingSources: [] }" (Supports: Disable filesystem settings) Quote: "settingSources: ["project"] // Only .claude/settings.json" (Supports: Load only project settings) Published: 2026-11-20T10:22:56Z Snapshot SHA-256: b5444415a9ff038182cbc8281d0de0ebf914d9eb979d9464cf04e20a54d708b4 (captured 2026-11-20T12:17:44Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:17:44Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:44Z Last attempt: 2026-11-20T12:17:44Z Notes and limitations: Extracted automatically from a single official source (section "`SettingSource`"). Related: https://latestn.com/tool/claude-code/settings/settings-file-locations Where do I save Claude Code settings for myself, my team, or my organization? https://latestn.com/tool/claude-code/settings/settings-json-comments Can I put comments in a Claude Code settings.json file? https://latestn.com/tool/claude-code/settings/settings-precedence Which Claude Code settings file takes precedence when the same key is set in multiple places? https://latestn.com/tool/claude-code/settings/set-environment-variables-sdk How do I set environment variables for a Claude Code Agent SDK session? https://latestn.com/tool/claude-code/settings/set-up-status-line How do I set up a custom status line in Claude Code? https://latestn.com/tool/claude-code/settings/set-working-directory-sdk How do I change the working directory for a Claude Code Agent SDK session? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T12:13:27Z | changed | Load only project settings: — → settingSources: ["project"] | [1] 2026-11-19T12:13:27Z | changed | Disable filesystem settings: — → settingSources: [] | [1] 2026-11-19T12:13:27Z | changed | Local settings location: — → .claude/settings.local.json | [1] 2026-11-19T12:13:27Z | changed | Project settings location: — → .claude/settings.json | [1] 2026-11-19T12:13:27Z | changed | User settings location: — → ~/.claude/settings.json | [1] 2026-11-19T12:13:27Z | changed | SettingSource type: — → type SettingSource = "user" | "project" | "local"; | [1] 2026-11-19T12:13:27Z | changed | Option name: — → settingSources | [1] 2026-11-19T12:13:27Z | changed | load only project settings: settingSources: ["project"] → — | [1] 2026-11-19T12:13:27Z | changed | disable filesystem settings: settingSources: [] → — | [1] 2026-11-19T12:13:27Z | changed | local settings location: .claude/settings.local.json → — | [1] 2026-11-19T12:13:27Z | changed | project settings location: .claude/settings.json → — | [1] 2026-11-19T12:13:27Z | changed | user settings location: ~/.claude/settings.json → — | [1] 2026-11-19T12:13:27Z | changed | allowed values: "user" | "project" | "local" → — | [1] 2026-11-19T12:13:27Z | changed | option name: settingSources → — | [1] 2026-11-18T12:13:29Z | changed | load only project settings: — → settingSources: ["project"] | [1] 2026-11-18T12:13:29Z | changed | disable filesystem settings: — → settingSources: [] | [1] 2026-11-18T12:13:29Z | changed | local settings location: — → .claude/settings.local.json | [1] 2026-11-18T12:13:29Z | changed | project settings location: — → .claude/settings.json | [1] 2026-11-18T12:13:29Z | changed | user settings location: — → ~/.claude/settings.json | [1] 2026-11-18T12:13:29Z | changed | allowed values: — → "user" | "project" | "local" | [1] 2026-11-18T12:13:29Z | changed | option name: — → settingSources | [1] 2026-11-18T12:13:29Z | changed | Load only project settings example: settingSources: ["project"] → — | [1] 2026-11-18T12:13:29Z | changed | Disable filesystem settings example: settingSources: [] → — | [1] 2026-11-18T12:13:29Z | changed | Local settings location: .claude/settings.local.json → — | [1] 2026-11-18T12:13:29Z | changed | Project settings location: .claude/settings.json → — | [1] 2026-11-18T12:13:29Z | changed | User settings location: ~/.claude/settings.json → — | [1] 2026-11-18T12:13:29Z | changed | SettingSource type: type SettingSource = "user" | "project" | "local"; → — | [1] 2026-11-18T12:13:29Z | changed | Option name: settingSources → — | [1] 2026-11-17T12:22:04Z | changed | Load only project settings example: — → settingSources: ["project"] | [1] 2026-11-17T12:22:04Z | changed | Disable filesystem settings example: — → settingSources: [] | [1] 2026-11-17T12:22:04Z | changed | Load only project settings: settingSources: ["project"] → — | [1] 2026-11-17T12:22:04Z | changed | Disable filesystem settings: settingSources: [] → — | [1] 2026-11-14T12:13:26Z | changed | Load only project settings: — → settingSources: ["project"] | [1] 2026-11-14T12:13:26Z | changed | Disable filesystem settings: — → settingSources: [] | [1] 2026-11-14T12:13:26Z | changed | Load only project settings example: settingSources: ["project"] → — | [1] 2026-11-14T12:13:26Z | changed | Disable filesystem settings example: settingSources: [] → — | [1] 2026-11-13T03:03:09Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/settings/setting-sources-precedence/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/settings/setting-sources-precedence POST: https://latestn.com/dispute/tool/claude-code/settings/setting-sources-precedence with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/settings/setting-sources-precedence?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I control which settings sources the Claude Code Agent SDK loads? Revision 5, last verified 2026-11-20T12:17:44Z. https://latestn.com/tool/claude-code/settings/setting-sources-precedence (accessed 2026-11-21T09:54:48Z). @misc{LatestN_tool_claude_code_settings_setting_sources_precedence_r5, title = {How do I control which settings sources the Claude Code Agent SDK loads?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/settings/setting-sources-precedence}}, note = {Revision 5; digest sha256:13ed006646c1fd9e; last verified 2026-11-20T12:17:44Z; accessed 2026-11-21T09:54:48Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/settings/setting-sources-precedence