Repository navigation
bb/provider-commands path#5624Description
Summary
In a Claude Code thread, the composer's / menu does not offer Claude Code's bundled skills (/simplify, /code-review, /loop, /batch, /debug, /claude-api) or any other command that only the running Claude Code process knows about. bb builds the menu from a filesystem scan (.claude/skills, .claude/commands, installed Claude Code plugin roots) plus its own clear and compact. Claude Code reports its live list on every session, but the provider drops it.
#5266 added a provider-neutral path for exactly this: a provider publishes bb/provider-commands thread state and the composer shows it. Only the new ACP adapter uses it today. The ask is for the Claude Code provider to feed the same path.
Versions and environment
- bb 0.46.0, desktop app
- macOS 26.6
- Claude Code 2.1.301 (
claude --version), providerclaude-code - Code checked against
mainat05771e3c82404328854468f0fff7f0f8203e2076 - Local machine, default data dir
Steps to reproduce
- Make a scratch project with no skills or commands of its own:
mkdir /tmp/cc-slash && cd /tmp/cc-slash && git init bb project create /tmp/cc-slash - Start a Claude Code thread there and send any message, for example
hi, so a Claude Code session starts. - In that thread's composer, type
/sim, then/code-r. - Run
bb thread commands <thread-id>. - Control: install a Claude Code plugin that ships a command or skill (
claude plugin install <plugin>), enable it, and type/<plugin>:in a new thread's composer.
Expected vs actual
Expected: step 3 offers /simplify and /code-review with their descriptions and argument hints, the same entries claude offers in a terminal in that directory. Step 4 lists them.
Actual: step 3 shows no match for either. Step 4 prints:
The agent has not advertised any commands for this thread.
Typing /simplify by hand and sending it works, because Claude Code expands the leading slash line itself. Only discovery is missing.
Step 5 is a control. The baseline scans installed and enabled Claude Code plugins, so their commands and skills should already appear. See below.
I saw the missing menu entries (step 3) on the desktop app without the patch mentioned below. The step 4 output is what the CLI prints when no list was published (session-state.ts#L85); I worked that out from the code rather than a live run. I have not re-run either step on a clean 05771e3c82 build. The code paths below are unchanged at that commit.
Evidence
What #5266 added, at 05771e3c82:
- A core thread-state kind
bb/provider-commandswith schema{ commands: { name, description, inputHint? }[] }, max 500 entries: packages/domain/src/thread-provider-state.ts#L9-L26. The server validates it against that core schema for any provider, with no per-pluginextensionKindsdeclaration and a 64 KiB payload cap: apps/server/src/internal/extension-payloads.ts#L131-L142. - The timeline head always loads the latest event of that kind: apps/server/src/services/threads/timeline.ts#L919-L940. It is projected into
providerCommandsassource: "command",origin: "builtin": packages/thread-view/src/provider-state-extraction.ts#L35-L51. - The composer merges those entries into the
/menu when the selected provider is the thread's provider: apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx#L921-L922, apps/app/src/hooks/useCommandSuggestions.ts#L258-L278.bb thread commandsprints the same list: apps/cli/src/commands/thread/session-state.ts#L121-L144. - The ACP-next bridge publishes it with
extension.statedeltas and skips unchanged payloads: packages/provider-bridge-acp-next/src/bridge/bridge.ts#L2643-L2661, #L2725-L2741. The Codex plugin already publishes the siblingbb/session-optionskind from a plugin bridge with a string literal, so a plugin provider can use these core kinds as they are: plugins/provider-codex/src/bridge/bridge.ts#L1033-L1072.
What the Claude Code provider does, at the same commit:
- It classifies the SDK's
system/initandsystem/commands_changedmessages as noise and reads nothing from them: plugins/provider-claude-code/src/visibility.ts#L514-L535. The bridge usesinitonly to trigger a context-usage capture: plugins/provider-claude-code/src/bridge/bridge.ts#L1501-L1505. - The menu for this provider is the scan in plugins/provider-claude-code/src/native-roots.ts#L16-L31 and packages/plugin-sdk/src/vendor-plugin-roots.ts#L746-L790, plus bb's built-ins in apps/server/src/services/threads/provider-command-typeahead.ts#L10-L25. Bundled skills ship inside the Claude Code binary, so no scan can find them.
Proposed change
Use the #5266 path. Do not add a Claude-specific one.
- In the Claude Code bridge, on
system/init, callquery.supportedCommands(). Onsystem/commands_changed, usemessage.commands. Map each entry to{ name, description, inputHint: argumentHint || undefined }and send it as anextension.statedelta withextensionKind: "bb/provider-commands". Skip unchanged payloads, as ACP-next does. - Filter with the
initfields:- Keep names in
skills. - Drop names in
terminal_slash_commands, such as/doctor. - Drop
__-prefixed internal names. - Drop CLI state commands (
/model,/config,/mcp, and the like) that are inslash_commandsbut not inskills. bb owns that state, and bb's owncompactandclearalready cover those two. - Bound description and argument-hint length, and the total size, to stay under the 500-entry and 64 KiB limits.
- Keep names in
Two things in the shared path will need a decision:
- Duplicates.
extractThreadProviderCommandstags every entrysource: "command", and the client dedupes onsource:name. A user or plugin skill that the scan finds (source: "skill") and that Claude Code also advertises would appear twice. Either the projection dedupes by name against the scanned catalog, or the state entry carries a source. - New-thread composer. The live list exists only after a session starts, so a new thread's composer still shows no bundled skills. One option is for the server to remember the last list each provider published on each machine and fall back to it when there is no thread yet. Storage is your choice.
What the fork patch does
The fork benwaffle/bb has a working patch in commit "Offer Claude Code's live slash commands in the thread composer". I am happy to rework it onto bb/provider-commands and share it. I wrote it before #5266 landed, so it adds a parallel mechanism (experimental_sessionCommandsExtensionKind, a provider-owned provider-claude-code/session-commands state kind). That duplicates what #5266 now provides, and the rework would drop that mechanism. In outline:
- The bridge publishes the filtered skill-type commands on
initand on everycommands_changed. It drops terminal-only and internal names and bounds field and payload sizes. GET /projects/:id/commandstakes an optionalthreadIdand merges the thread's live list into the scanned catalog, adding only entries the scan lacks.bb project commandsgains--thread.- The server remembers the last list per machine, so the new-thread composer offers bundled skills before a session exists.
- In the composer, Enter submits immediately only for bb's argument-less built-ins. Any other command keeps the composer open and shows its argument hint as placeholder text. The draft serializes as the literal line, for example
/code-review low.
What I ruled out
- Not a duplicate of ACP: surface available_commands_update as a slash palette (provider-acp drops OMP slash ads) #3848 or acp-opencode: a leading /skill-name for a bb-only skill silently completes an empty turn (provider swallows it as an unknown command) #4923. Those covered ACP agents, and Add an opt-in rebuilt ACP adapter, agent options in the model picker, and Codex Daybreak #5266 closed them. Claude Code does not use ACP and does not publish
bb/provider-commands. - Not Slash picker should use provider command names, not just filenames #3685, which covers command names from frontmatter in filesystem scans, not live lists.
- Not Project-scoped CLAUDE_CONFIG_DIR is ignored when listing a project's provider skills and commands #3925, which covers which config dir the scan reads. Bundled skills are in no directory.
- Not Skill chip picked mid-message is serialized without trailing space and never reaches Claude Code as a skill #2318, which covers serialization of a skill chip placed mid-message.
- Installed Claude Code plugins are not the gap. The baseline reads
installed_plugins.jsonandenabledPluginsand scans their roots, so their commands and skills should show. Only commands that live inside the session are missing, such as bundled skills. - Typing the full command by hand works, so execution is fine. Only discovery fails.
Suggested priority and effort
Low to medium priority. It affects every Claude Code user who uses bundled skills. Typing the full name by hand is a workaround, and nothing is lost. Effort is small on the bridge side; the duplicate and new-thread decisions add a little server and client work.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 16, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied the missing classification:
providers,provider-claude-codeThis adds live command discovery to the Claude Code integration; command execution remains available. The comparable provider command-discovery request #3848 is also classified as Feature. Medium effort reflects integration and command-catalog reconciliation across a few modules.
No existing classification values were replaced. Verified the final Type and all applied fields and labels. No reproduction report or pull request: this rule only proceeds with those steps for Bug issues.
fix(claude-code): discover live slash commands before and during thre…