Skip to content

fix(claude): load Claude SDK filesystem setting sources#1334

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
harshit97:ha/load-claude-setting-sources
Mar 23, 2026
Merged

fix(claude): load Claude SDK filesystem setting sources#1334
juliusmarminge merged 1 commit intopingdotgg:mainfrom
harshit97:ha/load-claude-setting-sources

Conversation

@harshit97
Copy link
Contributor

@harshit97 harshit97 commented Mar 23, 2026

Fixes #1267
Refs #1257

What Changed

Claude session startup now passes settingSources: ["user", "project", "local"] to the Anthropic SDK in ClaudeAdapter.

That tells the SDK to load Claude Code's normal filesystem-backed settings when T3 launches a Claude session, instead of only relying on the options T3 passes directly.

I kept this intentionally small:

  • no custom settings parser in T3
  • no Claude-specific config UI
  • no behavior changes outside Claude session startup

Why

This came out of two bug reports:

The common pattern in both reports is: Claude works fine in the CLI on the same machine, but Claude launched through T3 misses config that normally comes from Claude's settings files.

Auth is the most obvious failure mode.

In my own setup, I use Claude via API config in ~/.claude/settings.json, and at work that meant Claude worked normally in the CLI but T3-backed Claude sessions did not. The practical symptom looks like auth/login trouble because the Claude session T3 starts is missing settings that the normal Claude CLI session sees.

After auth, this also affects the broader class of Claude filesystem settings, including env-backed provider configuration. That lines up with the Bedrock / alternate provider reports too: if the Claude session launched by T3 does not load the same Claude settings sources as the CLI, you can end up with a session that behaves like it is using the wrong auth/provider path.

The reason I took this approach instead of adding T3-side parsing is that Anthropic's SDK already exposes the setting source mechanism directly:

So this patch just opts T3 into the SDK's documented settings-loading path rather than re-implementing Claude's config resolution in app code.

Manual validation

I manually tested this against a few different real-world Claude setups:

  • regular Anthropic Pro plan auth
  • my work setup, where Claude is configured through ~/.claude/settings.json to use a corporate Anthropic API proxy
  • Vertex AI, also configured through ~/.claude/settings.json

I also tried different permutations of Claude settings sources/files while checking the same basic behavior each time: if Claude already worked in the CLI on that machine, T3-backed Claude sessions should pick up the same config path instead of failing because auth/provider settings were missing.

Checklist

  • This PR is small and focused
  • I explained what changed and why

Note

Load Claude SDK filesystem setting sources for all sessions

Adds a CLAUDE_SETTING_SOURCES constant (['user', 'project', 'local']) in ClaudeAdapter.ts and passes it as settingSources in the options for every Claude SDK query session. This applies regardless of permission mode, including both full-access and approval-required runtime policies.

Macroscope summarized 2c07b51.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5201877e-8e63-4462-b3c9-1022de2f1a5e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@harshit97 harshit97 changed the title load Claude SDK filesystem setting sources fix(claude): load Claude SDK filesystem setting sources Mar 23, 2026
@juliusmarminge
Copy link
Member

perfect, this also makes it so user installed skills are loaded! thnak you

CleanShot 2026-03-23 at 10 08 35@2x CleanShot 2026-03-23 at 10 08 33@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Claude provider ignores ~/.claude/settings.json env, so proxy-backed Claude fails

2 participants