Skip to content

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

Description

@benwaffle

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), provider claude-code
  • Code checked against main at 05771e3c82404328854468f0fff7f0f8203e2076
  • Local machine, default data dir

Steps to reproduce

  1. 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
    
  2. Start a Claude Code thread there and send any message, for example hi, so a Claude Code session starts.
  3. In that thread's composer, type /sim, then /code-r.
  4. Run bb thread commands <thread-id>.
  5. 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:

What the Claude Code provider does, at the same commit:

Proposed change

Use the #5266 path. Do not add a Claude-specific one.

  1. In the Claude Code bridge, on system/init, call query.supportedCommands(). On system/commands_changed, use message.commands. Map each entry to { name, description, inputHint: argumentHint || undefined } and send it as an extension.state delta with extensionKind: "bb/provider-commands". Skip unchanged payloads, as ACP-next does.
  2. Filter with the init fields:
    • 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 in slash_commands but not in skills. bb owns that state, and bb's own compact and clear already cover those two.
    • Bound description and argument-hint length, and the total size, to stay under the 500-entry and 64 KiB limits.

Two things in the shared path will need a decision:

  • Duplicates. extractThreadProviderCommands tags every entry source: "command", and the client dedupes on source: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 init and on every commands_changed. It drops terminal-only and internal names and bounds field and payload sizes.
  • GET /projects/:id/commands takes an optional threadId and merges the thread's live list into the scanned catalog, adding only entries the scan lacks. bb project commands gains --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

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

  1. added
    providers
    provider-claude-code
    on Oct 16, 2026
  2. bb-slop-cop commented on Oct 16, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied the missing classification:

    • Type: Feature
    • Priority: Medium
    • Effort: Medium
    • Labels: providers, provider-claude-code

    This 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.

  3. added a commit that references this issue on Oct 19, 2026
    6dc2e2d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    provider-claude-codeproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions