Skip to content

Let plugins contribute to Settings → Usage limits #1620

Closed

Description

@slogsdon

Problem

Settings → Usage limits renders Claude Code and Codex. Anyone running additional metered or subscription model accounts has nowhere to see them beside those two, and a plugin cannot close the gap. It can fetch and compute the data, but there is no slot that renders into that page.

PluginAppSlots currently exposes 11 slots and none targets a host-owned settings page. PluginSettingsSectionRegistration has no page selector, so a plugin's usage UI lands under Extensions → Plugins → . The result is two usage surfaces in the same Settings sidebar, four items apart.

Why this is a small ask

The data already shares a shape. providerUsageResponseSchema is

{
  status,
  accountEmail,
  planLabel,
  windows: [{ label, usedPercent, resetsAt, cost? }]
}

and third-party lanes report the same thing. OpenCode Zen/Go's usage endpoint returns rolling/weekly/monthly windows with percent and resetsAt, which maps onto windows[] 1:1 with no lossy conversion. Metered providers (e.g. OpenRouter's credit balance) fit by leaving resetsAt null. The field already permits this.

Proposal

A backend contribution is a better fit than a frontend slot:

bb.ui.contributeUsageLimits(async () => ({
  id: "opencode-go",
  name: "OpenCode Go",
  planLabel: "Go",
  windows: [{ label: "Rolling (5h)", usedPercent: 12, resetsAt: "…" }],
}));

The host keeps one renderer, contributed lanes inherit the native styling and any future changes to it, and bb settings usage --json can include them for free, which matters more than the UI since an agent checking headroom before routing wants one call, not one per provider.

A frontend app.slots.usageLimitsSection({ id, component }) would also solve the placement problem, but each plugin would then draw its own bars and drift from the built-in look.

Working example

I built a local bb-plugin-lanes plugin for myself, which normalizes Claude Code, Codex, OpenCode Zen Go, and OpenRouter into that shape behind bb lanes and a settings section. It works, but it's in two places instead of one (Usage Limits). Screenshot attached below showing the four lanes rendered together. The content is ready to move the moment a slot exists.

image

Alternatives considered

  • homepageSection - always visible, but not with the other usage data.
  • navPanel - its own sidebar entry, same split-surface problem.
  • Living under Extensions → Plugins - where it is now, and the reason for this
    request.

Happy to open a PR if the contribution shape above is roughly the direction you'd want.

Activity

  1. added
    plugins
    on Aug 18, 2026
  2. ymichael commented on Oct 8, 2026

    @ymichael
    Collaborator

    Fixed by #3100 / #3449: plugins can contribute to Usage by implementing the Provider Usage usage-source contract.

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

    plugins

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions