Configure your agent changedagent-sdk/configuration
Nearest release: v2.1.329, published 4 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 19 Nov 2026 23:07 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 19 Nov 2026 23:37 UTC.
Upstream edited
Recorded here
Lines+2added
Lines−2removed
From line
8
where the diff opens
First seen
15 Sep 2026
this site's first read of the page
Recorded edits9to this page, all time
The whole hunk
from line 8, old and new numbered
/
from line 8
88
99## Pass options to a session
1010
11Every `query()` call accepts an options object: `Options` in TypeScript, `ClaudeAgentOptions` in Python. Each field is optional, and a session started with no options runs with the SDK's defaults. The example below configures a read-only session that summarizes a project's open TODOs. Pairs read as TypeScript / Python where the spellings differ:
11Every `query()` call accepts an options object: `Options` in TypeScript, `ClaudeAgentOptions` in Python. Each field is optional, and a session started with no options runs with the SDK's defaults. The example below configures a session that summarizes a project's open TODOs. Pairs read as TypeScript / Python:
1212
1313* **`model`**: picks the model
1414* **`allowedTools` / `allowed_tools`**: pre-approves a read-only tool list
from line 65
6565Settings files supply configuration beyond the options object. Two options control how they load:
6666
6767* **`settingSources` / `setting_sources`**: controls which filesystem sources load: user, project, and local. Settings files and CLAUDE.md files arrive through these sources.
68* **`settings`**: loads a settings file path or an inline JSON string in either language, and TypeScript also accepts a settings object. Whichever form you pass overrides user, project, and local filesystem settings; only managed policy settings rank higher. The references document the full precedence order under [Settings precedence](https://code.claude.com/docs/en/agent-sdk/typescript.md#settings-precedence) for TypeScript and [Settings precedence](https://code.claude.com/docs/en/agent-sdk/python.md#settings-precedence) for Python.
68* **`settings`**: loads a settings file path or an inline JSON string in either language, and TypeScript also accepts a settings object. Permission rules and most other lists you pass [add to](https://code.claude.com/docs/en/settings.md#lists-merge-instead-of-overriding) those in user, project, and local settings files. For most single values, Claude Code takes yours over those files; only managed policy settings rank higher. See the full order for [TypeScript](https://code.claude.com/docs/en/agent-sdk/typescript.md#settings-precedence) and [Python](https://code.claude.com/docs/en/agent-sdk/python.md#settings-precedence).
6969
7070Pass `[]` to disable user, project, and local settings. For more information, see [Use Claude Code features in the SDK](https://code.claude.com/docs/en/agent-sdk/claude-code-features.md).
7171
No line in this hunk matches that.