Skip to content

fix(claude): add settingSources to load Skills, Commands, and CLAUDE.md#1290

Closed
murataslan1 wants to merge 2 commits intopingdotgg:mainfrom
murataslan1:fix/claude-settings-sources
Closed

fix(claude): add settingSources to load Skills, Commands, and CLAUDE.md#1290
murataslan1 wants to merge 2 commits intopingdotgg:mainfrom
murataslan1:fix/claude-settings-sources

Conversation

@murataslan1
Copy link

@murataslan1 murataslan1 commented Mar 21, 2026

Summary

Adds settingSources: ["user", "project"] to Claude Agent SDK query options so that filesystem-based Claude Code features are loaded:

  • Skills (.claude/skills/ and ~/.claude/skills/)
  • Slash Commands (.claude/commands/ and ~/.claude/commands/)
  • CLAUDE.md memory files

Per the SDK docs, the SDK does not load any filesystem settings by default — settingSources must be explicitly configured.

Test plan

  • Install a Skill in ~/.claude/skills/ and verify it's available in t3code Claude sessions
  • Create a CLAUDE.md in a project directory and verify Claude reads it
  • Test custom slash commands in .claude/commands/

Fixes #1283

Note

Add settingSources to Claude queries to load Skills, Commands, and CLAUDE.md

Sets options.settingSources to ["user", "project"] in ClaudeAdapter.ts when building query options, enabling Claude to load user- and project-level settings. A corresponding test in ClaudeAdapter.test.ts asserts the value is present on all createQuery calls in full-access mode.

Macroscope summarized b76aed7.

The Claude Agent SDK does not load filesystem settings by default.
Without settingSources, Skills, slash commands, and CLAUDE.md memory
files are silently ignored.

Fixes pingdotgg#1283
Copilot AI review requested due to automatic review settings March 21, 2026 23:59
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 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: dcdf7f4b-25b4-4bd7-b9c5-e52bdcf94772

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.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 21, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Claude Agent SDK integration so that Claude Code filesystem-based features (Skills, slash commands, and CLAUDE.md memory) are discovered by explicitly enabling SDK settingSources.

Changes:

  • Pass settingSources: ["user", "project"] in the Claude Agent SDK queryOptions so filesystem settings are loaded.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

includePartialMessages: true,
canUseTool,
env: process.env,
settingSources: ["user", "project"],
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settingSources changes the Claude SDK session behavior, but there’s no test assertion that createQuery receives the expected sources. Please add/extend a unit test (e.g. in ClaudeAdapter.test.ts) to verify createInput.options.settingSources is set, so regressions don’t silently disable Skills/Commands/CLAUDE.md again.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a test for this in b76aed7

includePartialMessages: true,
canUseTool,
env: process.env,
settingSources: ["user", "project"],
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coding settingSources: ["user", "project"] means the server process will load host-level ~/.claude/* settings and project .claude/* files for every session. In web mode (where the server can bind to non-loopback), this can unintentionally apply/possibly expose host-specific CLAUDE.md memory, Skills, or slash commands to any authenticated client. Consider making settingSources configurable (e.g. via providerOptions.claudeAgent) and/or defaulting to a safer value (like only "project", or only enabling "user" in desktop mode).

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t3code is desktop-first and web mode still requires authentication, so the exposure risk here is pretty minimal. this change unblocks a commonly requested feature (skills/commands/memory). if web mode isolation becomes an actual concern down the line, we can scope settingSources per mode in a follow-up.

@TaylorJonesTRT
Copy link

Can confirm after using this branch this does fix the issue and the claude adapter pulls in proper skills and memory.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Mar 23, 2026
@juliusmarminge
Copy link
Member

#1334

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.

Claude integration does not load installed Skills, Slash Commands, or CLAUDE.md memory

4 participants