docs(readme): document filesystem settings defaults and CLAUDE.md loading#1115
Open
TejasAmle wants to merge 1 commit into
Open
docs(readme): document filesystem settings defaults and CLAUDE.md loading#1115TejasAmle wants to merge 1 commit into
TejasAmle wants to merge 1 commit into
Conversation
…ding The README never states that the SDK loads user/project/local filesystem settings (including CLAUDE.md, slash commands, and subagents) by default, matching CLI behavior. Users hit this in both directions: expecting memory to load when it does not appear to, and being surprised that deployed agents inherit host-machine settings. Add a short subsection stating the default, the production implication, and two copy-pasteable setting_sources examples. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BtNuvm15JHJv7c6QV28gsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The user problem
New SDK users hit the same surprise in two opposite directions, and file issues both ways:
Both trace to one fact the README never states: the SDK loads user/project/local filesystem settings by default, exactly like the CLI — including
CLAUDE.md, custom slash commands, and subagents. Making it harder to discover, the 0.1.0 CHANGELOG migration notes say the opposite ("No filesystem settings by default"), and older blog posts and LLM answers echo that. The one accurate description today is thesetting_sourcesdocstring intypes.py, which users evidently don't find before filing issues (~43 issues in this tracker mentionsetting_sources).What changed
A short "Filesystem Settings and CLAUDE.md" subsection in the README, placed after "Working Directory". It states the default in one sentence, names the production implication (host-dependent behavior), and gives two copy-pasteable
setting_sourcesexamples (hermetic, and project-only). Docs-only; no code touched.How verified
Ran
claude-agent-sdk0.2.116 from PyPI (bundled CLI 2.1.207, Linux, Python 3.12) with a scrubbed environment (allCLAUDE_*session vars removed). The working directory contained aCLAUDE.mdwith a marker codename;tools=[]andmax_turns=1so the model could not read the file with tools — it can only know the codename ifCLAUDE.mdwas injected as context. Then asked the model for the codename:ClaudeAgentOptionssystem_prompt={"type": "preset", "preset": "claude_code"}setting_sources=[]setting_sources=["project"]setting_sources=["project"]only (no preset)So
CLAUDE.mdloading is governed bysetting_sourcesalone (the system-prompt preset is not required), which is what the new section documents.Happy to reword, shorten, or move this into the docstring / platform docs instead if the README isn't the surface you want this on.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BtNuvm15JHJv7c6QV28gsh