Repository navigation
Description
The workflow
-
bb surfaces skills to ACP-family sessions (cursor, opencode dialects) as text pointers injected into session instructions. The exact contract, from
buildAcpSkillsInstructions(packages/provider-bridge-acp/src/session-params.ts):"bb skills are reusable instruction folders. When the current task matches a listed skill description, read that skill's SKILL.md at the absolute path before proceeding; you may read supporting files in the same skill directory that SKILL.md references. If a listed path does not exist, it has been superseded: read the same-named skill under your own agent's skills directory (...) instead of skipping the skill."
-
The model then opens SKILL.md with whatever tool it happens to have — its native file-read tool,
bash+sed -npaging, ornode -e "fs.readFile(...)"— pushing the whole file into context, frequently in chunks, frequently more than once.
What happens today (measured)
Event-log audit of a five-host deployment (292 threads, bb-app 0.40.0):
- 1,797 SKILL.md read events across 204 of 292 threads (70%), in 733 distinct turns. By provider: acp-cursor 909, codex 594, an acp-opencode dialect 263, claude-code 29, acp-opencode 6.
- Only Claude Code has an invocation surface — its native
Skilltool fired 20 times fleet-wide. Pooled read:invoke ratio ≈ 90:1. For codex / cursor / opencode dialects there is no invocation mechanism at all: reading the file is the designed invocation. - The cost is context, not wall-clock (42.6s total read time): ~13.7 MiB ≈ 3.5M tokens of skill content pushed into context fleet-wide. Codex is the worst offender — it pages skills in 200–300-line
sedchunks (66% of the volume). - The pointer catalog itself is not cheap either: 83 skills / ~51K chars ≈ 12.7K tokens injected per session before any skill is used.
- Re-reading is the norm: 281 thread+skill pairs were read more than once; the worst thread re-read skills 117 times across 38 turns with zero compactions. Reads cluster at turn start (median position 0.20 of the turn), so they also inflate every subsequent prompt in the session.
- The injected "has been superseded" fallback branch produces its own failure mode: 10 shell reads against stale listed paths that then hunt for the file elsewhere.
What you would expect
- A first-class invocation path for ACP and codex providers: the host/server loads SKILL.md content on demand (delivered as a tool result or ACP prompt part) rather than instructing the model to read files — with usage telemetry, which today is invisible (nothing records that a skill was "used", only that a file was opened).
- Per-session read dedup: a skill already read in the session should not be re-read at full length on later turns.
- Where the provider has a native mechanism (Claude Code's
Skilltool), the injected contract should prefer it over the pointer text.
Related: #4164 (skills double-listed when natively scanned), #2985 (skill syncing/staleness), #2318 (skill chip never reaches Claude Code as a skill).
Environment
bb-app 0.40.0, five enrolled hosts, 292 threads across cursor / codex / claude-code / opencode-dialect providers.
Activity