Skip to content

A provider's declared user skill root is scanned even when its resolver moved that root (CLAUDE_CONFIG_DIR) #3926

Closed

Description

@irium

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 (current main), run with pnpm 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 marker

Expected 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:

That resolver is exclusive by construction, and the documentation says so too:

provider-codex has the same shape and so is likely affected the same way through CODEX_HOME, though I did not reproduce that one:

IDs from the run above: project proj_dw68f2dp5c, host host_xisb5fz6i5.

What you ruled out

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

  1. added theissue type on Sep 19, 2026
  2. added
    providers
    provider-claude-code
    confirmed-repro
    on Sep 19, 2026
  3. bb-slop-cop commented on Sep 19, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Bug · 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.

    AGENT GENERATED

  4. added a commit that references this issue on Oct 28, 2026
    30a909d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovider-claude-codeproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions