Repository navigation
fix(claude-code): discover live slash commands before and during threads - #5777
Merged
Merged
Conversation
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
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-commandspath, deduplicate them against scanned skills, and filter terminal-only, bb-managed, internal, and bb-injected commands. Add a provider bridgecommands/listprobe 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). Passedpnpm exec turbo run test --filter=@bb/app -- useCommandSuggestions.test.ts(9 tests). Together these runs passed 5,449 tests. Formatting andgit diff --checkpassed. GitHub CI must pass before merge.Fixes #5624