Repository navigation
Description
Summary
A project skill root whose entries are symlinks (for example a checked-in .claude/skills/nerd -> ../../.agents/skills/nerd) yields no project skills for that provider. The host-daemon scanner refuses every symlinked entry in a project-origin root, even when the link stays inside the repository, so the slash-command picker on Claude Code and Pi threads shows none of the repo's skills while Codex, which also scans the real directories, shows all of them. Claude Code itself loads the same links fine.
Versions and environment
- bb 0.43.1 desktop app (macOS), reproduced on
mainat e9de27c with the unit test below. - macOS 26.6.2, Node 22.
- Claude Code 2.1.273 (its startup
system.initmessage lists all 200 slash commands from the same repo, including the linked ones). - Worktree environment; the project checkout is a normal git repository whose native skill roots are maintained by a sync script as symlinks:
.claude/skills/<name> -> ../../.agents/skills/<name>, and.agents/skills/<name>is itself sometimes a link into.codex/skills/<name>.
Steps to reproduce
cd "$(mktemp -d)" && git init -q repo && cd repo
mkdir -p .agents/skills/nerd .claude/skills
printf -- '---\nname: nerd\ndescription: probe\n---\nprobe\n' > .agents/skills/nerd/SKILL.md
ln -s ../../.agents/skills/nerd .claude/skills/nerd
# open this directory as a bb project, then:
bb skill list --json | jq '[.skills[] | select(.scope=="provider-project") | .provider] | group_by(.) | map({(.[0]): length}) | add'Unit-level: the added test in apps/host-daemon/src/command-discovery.test.ts ("follows project-origin symlinked skills whose target stays inside the workspace") fails on main and passes with the fix.
Expected vs actual
Expected: nerd listed as provider-project / claude-code and offered in the / picker on a Claude Code thread.
Actual, on a real repository with 120 such links (bb skill list --json, grouped by scope/provider):
provider-project/codex 106
provider-project/claude-code 0
provider-project/pi 0
The claude-code provider only shows provider-user rows from ~/.claude/skills (21) and plugin skills (8). Nothing is logged; the skills are simply absent.
Evidence
- The rule: (
bb/apps/host-daemon/src/command-discovery.ts
Lines 165 to 167 in e9de27c
function canFollowSkillSymlink(root: CommandScanRoot): boolean { return root.origin === "user" && root.source === "skill"; } canFollowSkillSymlinkreturns true only fororigin === "user"), applied to the directory entry at L175 and toSKILL.mdat L195. - Project roots already carry a workspace boundary (
boundaryPath) that the recursive shape enforces for the root itself:bb/apps/host-daemon/src/command-discovery.ts
Lines 316 to 332 in e9de27c
const resolvedRoot = await fs.realpath(root.rootPath).catch(() => null); if (resolvedRoot === null) { return null; } if (root.origin !== "project" || root.boundaryPath === undefined) { return resolvedRoot; } const resolvedBoundary = await fs .realpath(root.boundaryPath) .catch(() => null); return resolvedBoundary !== null && isPathWithinDirectory(resolvedBoundary, resolvedRoot) ? resolvedRoot : null; } async function scanRecursiveSkillRootFiles( - The provider declaration for Claude Code is
.claude/skillswithancestors: true, so the boundary is the repository root. - Investigation thread: bb
thr_vvesswr2g5(projectproj_5rk999rgnk).
What you ruled out
- Not bb skill list ignores symlinked skills (root symlink and per-skill symlink both invisible, no warning) #3238: that report is the
bb-userscan of~/.bb/skills(a different scanner);provider-userroots do follow links, as its follow-up comment notes. This report isprovider-projectroots. - Not Project slash commands are invisible when .claude/commands/*.md are symlinks #2602: that is the commands walker (
walkMarkdownTree) and.claude/commands/*.md; this is the flat skill root scan. Same underlying rule, different code path. - Not A linked project skill root is scanned outside the repository #2769 / PR Contain linked project skill roots inside the repository #2990: those concern the root itself being a link that escapes the repository. Here the root is a real directory and the entries are links that stay inside it.
- Not a Claude Code limitation:
claude -p --output-format stream-json --verbosein the same repo advertisesnerd,poteto,grill-meandrender-*inslash_commands. - Not frontmatter: the same
SKILL.mdfiles are listed for Codex through the real directories.
Suggested priority and effort
Medium priority: every repository that keeps one skill catalog and links it into each provider's native root loses all project skills on Claude Code and Pi threads, silently. Low effort: reuse the existing boundaryPath containment for entries (fix in the linked PR).
AGENT GENERATED
Activity
bjorn-supernomic commentedon Sep 17, 2026
Fix is ready in #3857 (auto-closed by the contributor gate; branch
bjorn-supernomic:fix/follow-workspace-skill-symlinks, commit d0e923a). It reuses the existingboundaryPathcontainment for linked entries, adds a regression test, and updatesdocs/provider-plugin-api.md. Happy to reopen once approved.bb-slop-cop commentedon Sep 17, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassified as Bug · Medium priority · Low effort. Added
host,provider-claude-code,provider-pi, andconfirmed-repro.Reproduction and root-cause report: REPRODUCED, high confidence. Two clean checkouts of trusted main failed the authored regression test: the project alias returned no skill, while direct-directory and user-alias controls passed. The full build and 26 existing discovery tests passed.
Root cause: the flat skill scanner allows symlinks only for user-origin roots, without considering the supplied project boundary.
No PR opened: changing filesystem traversal policy crosses a security boundary and is excluded from automatic simple fixes.
SawyerHood commentedon Sep 18, 2026
Duplicate of #2602. The newer reproduction, linked patch, and containment requirements are preserved at #2602 (comment). Closing for consolidation, not as fixed.