Repository navigation
Description
Summary
Nested skills load in standalone Pi but are absent from BB's skill list and command discovery. Moving the same discovery entry to the top level with a symlink makes it appear, without changing the skill file or its manual-only flag. BB should match Pi's recursive skill discovery.
Versions and environment
- BB 0.46.0, installed desktop app on macOS 26.6.2.
- Pi 1.1.0. Native discovery checked with its actual
loadSkillsAPI. - Reproduced through both the built-in
piprovider and a localpi-subagentsprovider fork. - Local host, default user skill directories, existing project checkout. No fresh BB data directory or source build was tested.
- Runtime tested against installed BB 0.46.0. Upstream source inspected at
3aa5ef327093f2834f800370881ac0bed8f2d811; that commit was not built or run locally.
Steps to reproduce
Set BB_PROJECT_ID to an existing project ID before running this script. BB sets this variable in agent sessions. The fixture and symlink are removed on shell exit. It adds a temporary manual-only skill and does not replace any existing file.
set -eu
PROJECT="${BB_PROJECT_ID:?Select a BB project first}"
TREE=$(mktemp -d "$HOME/.pi/agent/skills/bb-nested-demo.XXXXXX")
LINK="$HOME/.pi/agent/skills/bb-nested-discovery-demo"
if [ -e "$LINK" ] || [ -L "$LINK" ]; then
rmdir "$TREE"
echo "Probe name already exists; choose another name." >&2
exit 1
fi
trap 'rm -f "$LINK"; rm -rf "$TREE"' EXIT
mkdir "$TREE/leaf"
cat > "$TREE/leaf/SKILL.md" <<'EOF'
---
name: bb-nested-discovery-demo
description: Temporary nested-skill discovery probe.
disable-model-invocation: true
---
Reply with PROBE only when explicitly invoked by the user.
EOF
# Standalone Pi discovers /skill:bb-nested-discovery-demo in this layout.
# BB does not. Count matching native skill commands:
bb project commands "$PROJECT" --provider pi --json |
jq '[.commands[] | select(.name == "bb-nested-discovery-demo" or .name == "skill:bb-nested-discovery-demo")] | length'
# Actual: 0
# Make a top-level link to exactly the same directory:
ln -s "$TREE/leaf" "$LINK"
bb project commands "$PROJECT" --provider pi --json |
jq '[.commands[] | select(.name == "bb-nested-discovery-demo" or .name == "skill:bb-nested-discovery-demo")] | length'
# Actual: 1The reproducer above was executed and returned 0, then 1. A second fixture with a randomized probe name checked native Pi discovery and both BB providers, with the results below. No agent ran the probe instructions.
Expected vs actual
Expected: BB lists the nested skill before the top-level link, as standalone Pi does. A manual-only skill should remain available for explicit invocation without entering the automatic model skill prompt.
Actual output from the executed probe:
{"piNested": 1, "manualOnly": true, "modelPromptEmpty": true}
{"bbNested": {"pi": 0, "pi-subagents": 0}, "bbWithTopLevelLink": {"pi": 1, "pi-subagents": 1}}
Temporary fixture and link removed.
The original symptom involved a pstack bundle at ~/.agents/skills/pstack/skills/<skill>/SKILL.md, linked from ~/.pi/agent/skills/pstack. Pi discovered all 52 skills; bb skill list --project <project> --json discovered zero pstack entries. Adding 52 top-level pstack-* links to the unchanged directories made BB list all 52. Pi still loads each skill once and excludes all of them from its model skill prompt.
Evidence
Observed root configuration and likely cause:
- Pi's declared user and project skill roots use string entries, without recursive discovery.
- BB normalizes string root entries to
recursive: false. - Pi's configured and relocated skill-root resolver also returns roots without a recursive flag. Those extra-root variants were inspected, not separately reproduced.
- The packaged BB 0.46.0 root normalizer also defaults to
recursive: false. - Investigation: local BB thread.
Suggested fix: enable recursive discovery for Pi skill roots, including configured roots, and add a nested-bundle fixture to the native-root discovery tests. Preserve discovery bounds, project symlink boundaries, and manual-only metadata.
What was ruled out
- Not a malformed skill or an automatic-selection setting: Pi loaded the probe, its flag remained
true, and a top-level link made the identical file appear in BB. - Not stale discovery requiring a restart: consecutive CLI reads changed from 0 to 1 after adding only the link.
- Not limited to the local provider fork: the built-in
piprovider reproduced the same result. - Not Project slash commands are invisible when .claude/commands/*.md are symlinks #2602: that issue concerns skipped symlinked project command files; this reproduces with a real nested directory in a user skill root.
- Not A linked project skill root is scanned outside the repository #2769 or Symlinked entries in a project skill root are skipped even when they stay inside the repository #3856: these concern project symlink boundary/entry handling, not recursion in a user skill root.
- Follow-up to closed Discover skills from every provider-native location #1292, which required preserving provider-specific recursive behavior. Its location-discovery work does not cover this observed nested Pi skill omission.
- Searched open and closed issues for Pi skills, recursive discovery, and nested skills; no matching standalone bug report was found.
Suggested priority and effort
Medium. Nested skill bundles are invisible in BB, but top-level links provide a workaround. No data or work was lost. The provider declaration change appears small; bounded recursion and boundary tests still need verification.
Checks
- Reproduced on installed BB 0.46.0; no claim that current
mainwas executed. - Searched open and closed issues.
- Included a reproducer, observed output, versions, source permalinks, and the investigation thread.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 11, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-pi,confirmed-repro.3aa5ef3reproduce seven failing nested-discovery cases with a passing top-level-link control. Native Pi loads the same manual-only fixture while BB omits it. Complete reproduction sources are embedded in the report.Discover nested and linked Pi skills like Pi does (#5519)