Repository navigation
Description
Summary
When a provider both declares a static user skill root and resolves its own roots, bb scans the declared root in addition to the resolved one. For provider-claude-code the declared root is .claude/skills relative to the home directory, so with CLAUDE_CONFIG_DIR pointing elsewhere bb lists skills from both ~/.claude/skills and $CLAUDE_CONFIG_DIR/skills. I expected only the configured directory, because that is what the Claude Code CLI reads and what bb's own resolver and documentation describe. The listing therefore offers skills the agent will not have.
Versions and environment
- bb from source at
2c9fdf2dc02f09fb16003658f148bbd362cff0c2(currentmain), run withpnpm dev - WSL2 Ubuntu 20.04, kernel
6.18.33.2-microsoft-standard-WSL2, on Windows 11 Pro 26200 - Node v22.23.2, pnpm 9.15.0
- Provider:
claude-code. The Claude Code CLI is not installed on this host — the repro exercises only the skill listing path, no provider CLI and no login - Dev data dir
~/.bb-dev/src-bb-86e7c27699b2, no bb Connect, no remote machine, default ports
Steps to reproduce
Uses a global CLAUDE_CONFIG_DIR, so this is independent of #3925 — at global scope the resolver does receive the variable.
# 1. One marker skill in each candidate directory
mkdir -p ~/claude-alt/skills/alt-only-marker ~/.claude/skills/home-only-marker
printf -- '---\nname: alt-only-marker\ndescription: Lives only in CLAUDE_CONFIG_DIR\n---\nMarker.\n' \
> ~/claude-alt/skills/alt-only-marker/SKILL.md
printf -- '---\nname: home-only-marker\ndescription: Lives only in the default ~/.claude\n---\nControl.\n' \
> ~/.claude/skills/home-only-marker/SKILL.md
# 2. Any project
mkdir -p ~/repro-proj && git -C ~/repro-proj init -q
pnpm bb:dev project create --name repro --root ~/repro-proj --json # -> proj_dw68f2dp5c
# 3. Move the Claude configuration directory, globally
printf '%s' ~/claude-alt | pnpm bb:dev machine env set CLAUDE_CONFIG_DIR
# 4. List
pnpm bb:dev skill list --project proj_dw68f2dp5c | grep markerExpected vs actual
Actual, step 4:
skill_8a692284… alt-only-marker provider-user claude-code yes /home/irium/claude-alt/skills/alt-only-marker/SKILL.md
skill_c5dec09b… home-only-marker provider-user claude-code yes /home/irium/.claude/skills/home-only-marker/SKILL.md
Expected: only alt-only-marker. home-only-marker lives in a directory this configuration no longer uses, and an agent turn started from this project will not load it.
Evidence
The root set is assembled by concatenating the registration's declared roots with the plugin's resolved roots, with no suppression of a declared root that the resolver has superseded:
apps/server/src/services/providers/native-roots.ts#L210-L229—resolveProviderNativeRootSetemitsuser: [...registration.nativeSkillRoots.user]andresolved.skills, unconditionallyplugins/provider-claude-code/src/native-roots.ts#L17-L21— the declareduserroot is the literal.claude/skills, which never consultsCLAUDE_CONFIG_DIRplugins/provider-claude-code/src/native-roots.ts#L43-L48— the resolveduserroot ispath.join(plugins.claudeDir, "skills"), which does
That resolver is exclusive by construction, and the documentation says so too:
packages/plugin-sdk/src/vendor-plugin-roots.ts#L431-L439—resolveClaudeConfigDirreturns the configured directory or~/.claude, never bothdocs/configuration.md#L595— "$CLAUDE_CONFIG_DIR/skillsor~/.claude/skills"
provider-codex has the same shape and so is likely affected the same way through CODEX_HOME, though I did not reproduce that one:
plugins/provider-codex/src/native-roots.ts#L18-L22— declareduser: [".codex/skills", ".agents/skills"]together withexperimental_resolvesNativeRoots: true, while the resolver at#L56-L57builds its root fromresolveCodexHome
IDs from the run above: project proj_dw68f2dp5c, host host_xisb5fz6i5.
What you ruled out
- Not a duplicate of Project-scoped CLAUDE_CONFIG_DIR is ignored when listing a project's provider skills and commands #3925. There the project-scoped environment never reaches the resolver, so the configured directory is missed entirely. Here the resolver does receive the variable and answers correctly; the extra root is added afterwards. Verified by cherry-picking the fix proposed in Project-scoped CLAUDE_CONFIG_DIR is ignored when listing a project's provider skills and commands #3925 onto
2c9fdf2dc: the configured directory then appears, and~/.claude/skillsis still listed next to it. - Not Claude usage check ignores CLAUDE_CONFIG_DIR, reporting expired for a signed-in account #3607 (
provider-maintenance.tshardcodingos.homedir(), a credentials read, not a root scan). - Not a caching artifact. Stable across repeated calls; removing the variable flips the listing back deterministically.
- Not platform-specific. Reproduced on Linux under WSL2; no platform-conditional code on this path.
Open question for maintainers
It is possible the declared root is intended as a static fallback that a resolver only augments, in which case the defect is in provider-claude-code's declaration rather than in the merge. I could not find a statement of the intended precedence between experimental_nativeSkillRoots and a resolver's answer in the Plugin Guide. Whichever way it is meant, the current result contradicts docs/configuration.md#L595, so either the merge, the declaration, or the documentation needs to change.
Suggested priority and effort
Low to Medium — over-reports rather than hides, so nothing breaks loudly, but the / menu and Skills page offer skills the agent cannot load, and it undoes the point of moving the configuration directory. Effort: Low once the intended precedence is decided.
Investigation thread: bb thread thr_726226jzf9 in project proj_bexqdcicip (local instance).
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 19, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotBug · Priority: Medium · Effort: Low
Labels:
providers,provider-claude-code,confirmed-repro.Reproduction and root-cause report: REPRODUCED, high confidence. A filesystem integration regression failed on trusted main and again in a second clean checkout: both configured and default user skills were discovered.
The Claude provider declares the default skill directory alongside its environment-aware resolver; the documented additive scan retains both.
No PR: the local fix passes the regression, but completing it requires changing a generated golden file, which this rule excludes.
Resolve, never declare, skill roots under a relocatable provider home
Stop scanning ~/.claude/skills when CLAUDE_CONFIG_DIR moves it (get-b…