Skip to content

Pi nested skills are missing from BB discovery #5364

Closed

Description

@koenvg

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 loadSkills API.
  • Reproduced through both the built-in pi provider and a local pi-subagents provider 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: 1

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

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

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 main was executed.
  • Searched open and closed issues.
  • Included a reproducer, observed output, versions, source permalinks, and the investigation thread.

AGENT GENERATED

Activity

  1. added theissue type on Oct 11, 2026
  2. added
    providers
    provider-pi
    confirmed-repro
    on Oct 11, 2026
  3. bb-slop-cop commented on Oct 11, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low. Labels: providers, provider-pi, confirmed-repro.
    • Report: https://get-bb.github.io/reports/issues/5364.html
    • Verdict: REPRODUCED · Root-cause confidence: high.
    • Root cause: Pi's declared and configured skill roots default to shallow scanning; the recursive walker additionally skips linked bundle entries.
    • Verification: Two clean checkouts of trusted main 3aa5ef3 reproduce 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.
    • No PR: The provider-only repair still misses linked bundles and regresses existing user links; completing it requires shared symlink-traversal changes outside the simple-fix safety gate. The attempted change was reverted and not pushed.
  4. added a commit that references this issue on Oct 14, 2026
    9daa623
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-piproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions