Skip to content

Slash picker should use provider command names, not just filenames #3685

Description

@iamhenry

Problem

BB’s / picker names provider commands from the markdown filename. OpenCode’s live command list (GET /command) uses a different name when the file’s YAML frontmatter has name: (for example research-contract.md with name: rc is /rc in OpenCode and OpenChamber).

The OpenCode BB plugin already:

  • Scans OpenCode’s command/ and commands/ dirs so the files show up
  • Routes send via GET /command + POST /session/:id/command, so typing /rc and sending can run

It cannot put /rc in the picker. Native roots are filesystem-only. fallbackName is skill-file only. There is no API to inject the provider’s command catalog.

Result: with OpenCode selected, /rc and /tc do not appear under Commands. /research-contract and /task-contract do. Skills are unaffected because they already use frontmatter name.

Outcome

With OpenCode selected, the Commands section of / shows the same names OpenCode uses (/rc, /tc), without the plugin hardcoding aliases or replacing BB’s composer.

Acceptance

  • An OpenCode markdown command whose runtime name is rc (frontmatter name: rc, file research-contract.md) appears as /rc in BB’s Commands picker
  • Commands with no name override still appear as the filename, as today
  • Skills typeahead is unchanged
  • Provider plugins are not required to ship a custom slash overlay

Out of scope

  • Fuzzy matching for /taskc vs /task-contract
  • Changes in the OpenCode plugin as a substitute for this catalog/name gap

Evidence

  • OpenCode command load: filename is the default, then frontmatter is spread over it, so name: wins (packages/opencode/src/config/command.ts)
  • OpenChamber picker: client.command.list / GET /command, not filenames (useCommandsStore.ts)
  • BB: fallbackName is skill-file only (packages/domain/src/native-roots.ts)

Activity

  1. added
    providers
    plugins
    on Sep 14, 2026
  2. bb-slop-cop commented on Sep 14, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied Type: Feature · Priority: Medium · Effort: High and labels providers, plugins. No existing classification values were replaced.

    The current native-root contract provides filesystem command discovery; provider-defined command naming/catalogs require a new shared capability. Priority reflects the limited scope and reported direct-entry workaround; effort reflects the shared API design needed.

    Verified final Type: Feature. Reproduction report and PR skipped under the non-bug rule.

  3. benwaffle commented on Sep 15, 2026

    @benwaffle

    I hit the same gap from the Claude Code side and built the injection point this issue asks for on my fork. Sharing the shape in case it helps decide the upstream API.

    benwaffle@b6d1f79

    The symptom was different but the cause is the same: Claude Code's bundled skills (/code-review, /simplify, /loop, /batch, …) exist only inside the running agent process, so the filesystem-scanned catalog never shows them, and any provider that renames a command at runtime (your name: rc case) has no way to say so.

    Design

    • A provider declares experimental_sessionCommandsExtensionKind: the name of an extension kind whose state payload is the agent's live slash-command list, validated against experimental_sessionCommandsStateSchema (name, description, argument hint; bounded sizes).
    • The Claude Code bridge publishes that state on the SDK init message and again on every commands_changed push, keeping skill-type commands and dropping terminal-only and internal names. An OpenCode plugin would publish the result of GET /command the same way.
    • GET /projects/:id/commands accepts an optional threadId. When that thread runs the requested provider, the server reads its latest published list and merges the entries the scanned catalog lacks. Provider names win, so /rc would appear as /rc.
    • The server also remembers the most recent list each provider published per machine (provider_session_commands table) and falls back to it when no thread is given or the thread has not published yet, so the new-thread composer already offers the provider's commands before a session exists. bb project commands gains --thread.
    • In the composer, Enter submits immediately only for bb's own argument-less built-ins (clear, compact). Any other command leaves the caret after the pill and renders the argument hint as placeholder text until the user types; the draft serializes as the literal slash line (/code-review low).

    No custom slash overlay in the provider plugin, and skills typeahead is untouched, which matches the acceptance list here.

    Composer / menu on the fork with Claude Code's live skills, descriptions, and argument hints:

    live provider commands in the slash picker

    AGENT GENERATED

  4. SawyerHood commented on Sep 15, 2026

    @SawyerHood
    Collaborator

    Consolidating duplicate #3684 here at the maintainer's request. The two reports have identical triggers, evidence and acceptance criteria. This tracker also contains the later Claude Code live-command catalog design discussion, so it retains the fuller context.

    Preserve the OpenCode case: research-contract.md with frontmatter name: rc must appear as /rc in the Commands picker; commands without an override retain filename-derived names. Directly typing /rc can already run, but picker discovery is missing. Skills typeahead must remain unchanged, and providers should not need their own slash overlay. Fuzzy matching remains outside scope.

    The additional Claude Code case (runtime-only bundled commands) is covered by the catalog design discussion in #3685 (comment). The proposed fork implementation is design evidence, not an upstream fix. Closing #3684 does not mark this request implemented.

    AGENT GENERATED

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

    pluginsproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions