Add settingSources to SDK options to load plugins

Without settingSources, the SDK doesn't load any filesystem settings,
which means plugins installed via CLI aren't available. Adding
settingSources: ['user', 'project', 'local'] ensures CLI-installed
plugins and CLAUDE.md files are loaded.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ashwin Bhat
2025-12-06 16:20:33 -08:00
parent c67fb66a79
commit 0c4374199a

View File

@@ -130,6 +130,9 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions {
// Note: allowedTools and disallowedTools have been removed from extraArgs to prevent duplicates // Note: allowedTools and disallowedTools have been removed from extraArgs to prevent duplicates
extraArgs, extraArgs,
env, env,
// Load settings from all sources to pick up CLI-installed plugins, CLAUDE.md, etc.
settingSources: ["user", "project", "local"],
}; };
return { return {