From f98c1a5aa8133c51d4e244f6249b22c506947ab9 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 16 Dec 2025 15:00:34 -0800 Subject: [PATCH] fix: respect user's --setting-sources in claude_args (#750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When users specify --setting-sources in claude_args (e.g., '--setting-sources user'), the action now respects that value instead of overriding it with all three sources. This fixes an issue where users who wanted to avoid in-repo configs would still have them loaded because the settingSources was hardcoded to ['user', 'project', 'local']. Fixes #749 Co-authored-by: Ashwin Bhat 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> --- base-action/src/parse-sdk-options.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/base-action/src/parse-sdk-options.ts b/base-action/src/parse-sdk-options.ts index 32eb96c..d971c2e 100644 --- a/base-action/src/parse-sdk-options.ts +++ b/base-action/src/parse-sdk-options.ts @@ -249,10 +249,18 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions { extraArgs, env, - // Load settings from all sources to pick up CLI-installed plugins, CLAUDE.md, etc. - settingSources: ["user", "project", "local"], + // Load settings from sources - prefer user's --setting-sources if provided, otherwise use all sources + // This ensures users can override the default behavior (e.g., --setting-sources user to avoid in-repo configs) + settingSources: extraArgs["setting-sources"] + ? (extraArgs["setting-sources"].split( + ",", + ) as SdkOptions["settingSources"]) + : ["user", "project", "local"], }; + // Remove setting-sources from extraArgs to avoid passing it twice + delete extraArgs["setting-sources"]; + return { sdkOptions, showFullOutput,