Repository navigation
Conversation
Claude Code declared ~/.claude/skills as a fixed user root while its resolver also returned $CLAUDE_CONFIG_DIR/skills, so a moved profile listed both. The resolver already returns the active folder, so the fixed root is gone. Fork resolved a relative CLAUDE_CONFIG_DIR against the bridge process instead of the session's cwd, where Claude Code reads it. Health and usage read credentials, the account file and the macOS Keychain item of the default profile; they now read the profile CLAUDE_CONFIG_DIR selects. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 tasks done
This was referenced Nov 5, 2026
ymichael
added a commit
that referenced
this pull request
Nov 6, 2026
## Human comments ## What was wrong `provider-claude-code` declared a static user skill root (`.claude/skills` under home) and also set `experimental_resolvesNativeRoots`, resolving its roots from `CLAUDE_CONFIG_DIR`. bb scans declared roots in addition to resolved ones, so with `CLAUDE_CONFIG_DIR` set the skill list included `~/.claude/skills` as well as `$CLAUDE_CONFIG_DIR/skills`. Claude Code reads only the configured directory, so the listing offered skills the agent never loads (#3926). ## What changed - `plugins/provider-claude-code/src/native-roots.ts`: removed the declared `user` skill root. `resolveClaudeNativeRoots` already returns `<claudeDir>/skills`, which is `~/.claude/skills` by default and `$CLAUDE_CONFIG_DIR/skills` when set. The declared project roots are unchanged. - `tests/integration/native-roots-golden`: the fixture now treats the home skills (`home-claude-skill`, `linked-home-skill`) as present in the default variant and absent in the `config-dir` variant, and the `claude-code.config-dir.json` golden drops them. This is the skills half of closed #6495. The health/usage, fork and `config-directory.ts` changes are out of scope; #3607 covers them. The change stays inside the plugin: no protocol bump, no SDK change. ## How you verified - `pnpm exec turbo run test --filter=bb-plugin-provider-claude-code`: 29 files, 430 tests pass. - `vitest run native-roots-golden` in `tests/integration`: 22 tests pass, including the default and config-dir Claude Code variants. Without the native-roots change, the updated fixture fails because the home skills are reported under `CLAUDE_CONFIG_DIR`. - CI runs the full suites. Fixes #3926 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The Claude Code plugin worked out the Claude config folder in three places, and none of them matched Claude Code when
CLAUDE_CONFIG_DIRis set:~/.claude/skillsas a fixed user root. Its resolver also returned$CLAUDE_CONFIG_DIR/skills, so a moved profile listed skills from both folders.CLAUDE_CONFIG_DIRwas resolved against the bridge process's directory instead of the session's cwd, which is where Claude Code reads it.~/.claude/.credentials.json,~/.claude.jsonand the default Keychain item. A signed-in custom profile could therefore show as expired.What changed
All changes are inside
plugins/provider-claude-code: no daemon protocol change and no SDK change.native-roots.ts: removed the declared user root.claude/skills. The resolver already returns the active profile'sskillsfolder,~/.claude/skillsby default.bridge/config-directory.ts: one rule for the Claude folder.CLAUDE_CONFIG_DIRis resolved against the session's cwd and NFC-normalized; when it's unset, the folder is~/.claude. The same file gives the profile's account file and Keychain service:Claude Code-credentials, plus-<first 8 hex of sha256(CLAUDE_CONFIG_DIR)>when the variable is set.bridge.ts: fork passes the session cwd.provider-maintenance.ts: health and usage read the active profile's credentials file, account file and Keychain item.Known trade-off: if the Claude resolver fails, for example because the plugin worker crashed,
~/.claude/skillsdrops out of bb's skill list until it recovers. bb retries after its 10-second cache window. Before this change, the declared root kept that folder listed.Out of scope: project env overrides in listings (#3925), and the bb CLI skill install folder.
How you verified
CLAUDE_CONFIG_DIRset, usage reads only that profile's Keychain item and files. It fails on main and passes here.claude-code (config-dir): fails on main because it listshome-claude-skillandlinked-home-skill, and passes here. The default golden is unchanged.config-directory.test.ts: relative paths resolve against the session's cwd, and the default profile is unchanged.pnpm exec turbo run typecheck test --filter=bb-plugin-provider-claude-codepasses. All 22 native-roots goldens pass, as do 12 server test files that cover Claude skills and provider roots (180 tests). oxlint is clean.Fixes #3926
Fixes #3607
🤖 Generated with Claude Code