Since claude-agent-sdk 0.1.53, leaving setting_sources unset loads every Claude Code setting layer. RAE never set it, so each nested session picked up the user's own CLAUDE.md, hooks, plugins, permission rules and MCP servers. On a heavily customized machine this derailed runs and still reported status: "ok".
What
New build_sdk_settings() in utils.py, used by all 5 ClaudeAgentOptions call sites (agent with both providers, engineer, collector, folder naming).
Sessions are isolated by default: setting_sources=[] plus strict_mcp_config=True.
New config key claude_setting_sources (default []) opts back into chosen layers (user, project, local). Invalid values keep the session isolated.
Raise the claude-agent-sdk floor to >=0.2.174. This guarantees working setting_sources=[] (0.1.62+) and strict_mcp_config (0.1.74+), and the release ships a win_amd64 wheel that 0.2.157 lacked.
README and SDK docs explain the isolation, and how to opt out when ~/.claude/settings.json provides auth (apiKeyHelper, Bedrock, Vertex, proxies).
Verification
12 new tests: the helper defaults, the opt-in, invalid values, and each call site. They fail without the change.
pytest (1039 passed), ruff check.
Live probe on a machine with a large personal Claude Code setup:
MCP servers: 62 → 0.
Plugins: 10 → 3 (all three are Claude Code built-ins).
The user's CLAUDE.md is no longer applied.
Live agent run (chrome-mcp, headless, Ashby jobs board):
still produces a working client (794 postings);
cache writes: 117k → 98k tokens;
cost: $0.83 → $0.68.
Out of scope
Reporting status: "ok" when no client is written. That goes in a separate PR.
Confidence Score: 5/5
Safe to merge; no actionable findings remain.
Summary
Claude sessions now ignore personal Claude Code settings by default.
Claude sessions now ignore personal settings unless users select them.
Executed checks confirmed that default and invalid configurations preserve isolation across all five session paths. Explicitly selected settings layers are preserved, and the engineer's verification MCP server remains available.
kalil0321 explicitly documents that settings-based authentication requires opting back in because authentication may come from ~/.claude/settings.json. Reporting success when no client is written is explicitly deferred by kalil0321 to another PR.
No blocking issues were found. The reviewed changes are safe to merge.