Skip to content

fix(claude-code): discover live slash commands before and during threads - #5777

Merged
ymichael merged 6 commits into
mainfrom
bb/fix-bb-issue-5624-thr_8anirbihab
Oct 19, 2026
Merged

ymichael merged 6 commits into
mainfrom
bb/fix-bb-issue-5624-thr_8anirbihab

Conversation

@ymichael

@ymichael ymichael commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Claude Code reported its live slash commands, including bundled skills such as /simplify, but bb discarded the catalog. Filesystem discovery could not find these commands, and new threads had no live session from which to obtain them.

What changed

Publish and refresh Claude Code commands through the shared bb/provider-commands path, deduplicate them against scanned skills, and filter terminal-only, bb-managed, internal, and bb-injected commands. Add a provider bridge commands/list probe so project and personal composers can discover commands before the first turn without sending a prompt. Personal discovery uses an empty directory on the selected host. Reuse initialization probing for model discovery. Update provider protocol documentation, the CLI guide, and provider skill. Advance the host daemon protocol to 244 and Plugin SDK to 0.6.58.

How you verified

Regression coverage includes command filtering and payload bounds, live updates, bridge command discovery, composer deduplication, and personal-project discovery. Passed pnpm exec turbo run test typecheck --filter=@bb/host-daemon --filter=@bb/server --filter=bb-plugin-provider-claude-code --filter=@bb/host-daemon-contract --filter=@bb/agent-runtime --filter=@bb/provider-bridge-protocol (21 successful tasks). Passed pnpm exec turbo run test --filter=@bb/app -- useCommandSuggestions.test.ts (9 tests). Together these runs passed 5,449 tests. Formatting and git diff --check passed. GitHub CI must pass before merge.

Fixes #5624

AGENT GENERATED

ymichael and others added 6 commits October 16, 2026 15:39
The Claude Code bridge now publishes the session's slash commands as
bb/provider-commands state, so bundled skills such as /simplify and
/code-review appear in the composer's / menu and bb thread commands.
On each system/init it reads supportedCommands(); on commands_changed it
uses the pushed list. Names that init reports as terminal-only or as
non-skill CLI commands (/model, /config, ...) and __-prefixed internal
names are dropped, and descriptions, hints, and payload size are bounded.

The composer drops a live entry when the scanned catalog already offers
that name, so user and plugin skills are not listed twice.

Fixes #5624

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dels without a prompt

Claude Code advertises the skills bb injects through its own plugins as
bb-global-skills:<name>, while bb's catalog scan already lists them as
<name>, so the composer showed each one twice. The bridge now leaves out
commands namespaced by a plugin it injected.

Claude Code reports init.skills for the agent's current folder, so a
turn that starts after the agent moved elsewhere could drop project skills
from the list. Only init frames from the session's launch folder now
update which commands count as skills.

The model probe sent "." as a real prompt and relied on closing before
Claude Code made a model request; maxTurns: 0 does not prevent the turn.
It now starts Claude Code with a prompt stream that never yields and ends
on close, so initialization data is read without a model request.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The new-thread composer could not offer Claude Code's bundled skills,
because they only arrived once a thread's first turn started. Providers can
now answer a commands/list bridge request for a folder, declared through a
commands.list handshake capability. The runtime sends it only to bridges
that declare it, the host daemon exposes it as provider.list_commands
(protocol 239), and GET /projects/:id/commands merges the result into the
scanned catalog, adding only names the scan does not already list.

The Claude Code bridge answers by starting Claude Code in that folder
without sending a prompt and reading its initialization data, cached per
folder for two minutes. The model probe now shares that prompt-free path.

Both menus use one rule: show every command Claude Code reports except a
fixed list of commands for settings bb manages, terminal-only and internal
commands, and skills bb injected itself. A running thread therefore no
longer depends on Claude Code's per-folder skills list, and the launch-folder
guard is gone. Reported commands are validated, so a malformed entry is
dropped instead of crashing the bridge.

Conformance gains commands/list-declared, mirroring skills/configure.
Plugin SDK 0.6.54.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…thr_8anirbihab

# Conflicts:
#	apps/host-daemon/src/command-dispatch.ts
#	packages/agent-runtime/src/provider-adapter.ts
#	packages/domain/src/plugin-sdk-version.ts
#	packages/host-daemon-contract/src/protocol.ts
#	packages/host-daemon-contract/test/contract.test.ts
#	packages/plugin-sdk/package.json
@ymichael
ymichael merged commit 6dc2e2d into main Oct 19, 2026
87 of 89 checks passed
@ymichael
ymichael deleted the bb/fix-bb-issue-5624-thr_8anirbihab branch October 19, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code: publish the session's live slash commands through the #5266 bb/provider-commands path

1 participant