Repository navigation
Description
Summary
For Pi threads, bb's skill listing (slash picker, Settings → Skills, bb skill list) silently drops most user skills. The recursive skill scan in host-daemon shares one 1,000-entry budget across all of a provider's roots and counts every file inside every skill folder, so a normal-sized ~/.pi/agent/skills uses up the budget before the scan reaches ~/.agents/skills. Expected: every skill with a SKILL.md in a declared root is listed. Pi itself loads all of them; only bb's listing is short.
Likely a regression from #5519 (merged 2026-10-14). It made the Pi roots recursive, and its description notes that the walker "keeps descending inside skill folders" and that "BB keeps its 24-level and 1,000-entry bounds". Before that, the shallow scan of these roots had no entry budget.
Versions and environment
- bb 0.46.1 (desktop app), macOS 26.5.1
- pi 1.4.0
- Local machine, project checkout environment, default data dir
Steps to reproduce
- Have a user skill root with skill folders that together hold more than 1,000 files and folders (
references/,scripts/,assets/count). Mine:~/.pi/agent/skillshas 213 skills and about 3,450 entries (find -L ~/.pi/agent/skills -mindepth 1 | wc -l);~/.agents/skillshas about 300 skills and about 5,000 entries. bb skill list --json | jq '[.skills[] | select(.provider=="pi")] | length'bb skill list --json | jq -r '.skills[] | select(.name=="app-designer") | .provider'(app-designerexists only in~/.agents/skills)
Untested minimal recipe for a clean machine: create 60 skills in ~/.pi/agent/skills, each with a SKILL.md and 20 files in references/; fewer than 60 will be listed for pi.
Expected vs actual
Actual: 49 pi skills listed, alphabetically agent-browser … docx (the first 50 root entries; one is dropped for an invalid name).
domain-modeling … and every later skill in ~/.pi/agent/skills is missing.
Nothing from ~/.agents/skills is listed for pi. app-designer shows only for claude-code and codex.
Expected: every SKILL.md under ~/.pi/agent/skills and ~/.agents/skills is listed for pi.
Evidence
apps/host-daemon/src/command-discovery.tsat1e80ca7:- 1,000-entry cap:
const MAX_SCAN_ENTRY_COUNT = 1_000; - every directory entry read takes one from the budget:
bb/apps/host-daemon/src/command-discovery.ts
Lines 109 to 125 in 1e80ca7
async function readDirEntries( dirPath: string, budget?: ScanBudget, ): Promise<Dirent[] | null> { try { const directory = await fs.opendir(dirPath); const entries: Dirent[] = []; for await (const entry of directory) { if (budget?.remainingEntries === 0) { break; } if (budget !== undefined) { budget.remainingEntries -= 1; } entries.push(entry); } return entries.sort(sortDirentsByName); walkSkillTreekeeps going into a skill folder after it finds itsSKILL.md:bb/apps/host-daemon/src/command-discovery.ts
Line 368 in 1e80ca7
async function walkSkillTree(args: WalkSkillTreeArgs): Promise<void> { discoverSkillsgives all roots one budget:bb/apps/host-daemon/src/command-discovery.ts
Lines 592 to 597 in 1e80ca7
export async function discoverSkills( args: DiscoverSkillsArgs, ): Promise<DiscoveredSkill[]> { const records: DiscoveredSkill[] = []; const budget = { remainingEntries: MAX_SCAN_ENTRY_COUNT }; for (const root of args.roots) {
- 1,000-entry cap:
- Pi declares
.pi/agent/skillsand then.agents/skillsas recursive user roots (plugins/provider-pi/src/native-roots.ts), so the second root gets no budget. - The cut falls exactly at the budget: line 50 of the sorted root listing is
docx, and line 51 isdomain-modeling, the first missing skill. - Thread: thr_5n48kevs7t
What you ruled out
- Not a frontmatter problem: the missing skills load fine in pi itself and are listed for codex/claude-code from the same files.
- Not symlink handling: the 49 skills that are listed are symlinks too (user roots follow symlinks).
- Not Pi nested skills are missing from BB discovery #5364 (nested Pi skills missing), which Discover nested and linked Pi skills like Pi does #5519 fixed: that change caused this one. Not Imported symlinked skills are listed but their details and files fail to load #5555 (symlinked skill details failing to load), Grok Build skips user skills installed as symlinks #4013 (Grok Build symlinks), Symlinked entries in a project skill root are skipped even when they stay inside the repository #3856 (project-root symlinks) or Slash menu lists plugin skills that agents.configure deselected #5215 (deselected plugin skills).
- The code is the same on
mainat1e80ca7.
Suggested priority and effort (optional)
Medium: hits any Pi user with a few dozen real skills; the only workaround is asking for the skill by name. Effort low: stop going into a folder once its SKILL.md is found, give each root its own budget, or count only directories.
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. (Reproduced on 0.46.1; the code is the same onmainat1e80ca7.) - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 23, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-pi; reproduction label:confirmed-repro.Give each skill root its own entry cap and count only folders
Give each skill root its own entry cap and count only folders
Unify skill discovery and dedupe; pass picked skills to Codex (get-bb…