Skip to content

Let a custom ACP agent declare that it reports usage - #3896

Merged
SawyerHood merged 1 commit into
get-bb:mainfrom
OXI-717:acp-custom-agent-usage
Sep 18, 2026
Merged

SawyerHood merged 1 commit into
get-bb:mainfrom
OXI-717:acp-custom-agent-usage

Conversation

@OXI-717

@OXI-717 OXI-717 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Root cause

A shipped ACP agent opts into the usage surface with providerUsage, which
acpProviderDeclaration turns into maintenance.usage. The custom-agent schema
(customAcpAgentSchema) is .strict() and has no such field, and
customAcpAgentDefinition never sets one — so an agent configured through the
customAgents setting can never appear in Provider Usage, even when it runs the same CLI
a shipped agent runs and the bridge already knows how to read usage for its dialect.

That is the common shape of a custom entry: the same agent, launched differently. Mine
runs Cursor with an explicit --agent-endpoint so its traffic goes through a credential
broker instead of straight to the vendor; it is dialect: "cursor" in every other
respect, including the usage the bridge can fetch. The card is simply blank today, with
no way to say otherwise.

Change

  • providerUsage?: boolean on customAcpAgentSchema, passed through in
    customAcpAgentDefinition.
  • Default behaviour is unchanged: an entry that does not ask for it stays off the usage
    surface, so nothing new shows up for existing configurations.

Verification

pnpm exec turbo run typecheck test --filter=bb-plugin-provider-acp → 9 files, 17 tests
passing, including two added cases: an entry asking for the capability declares
maintenance.usage === true, and one that does not stays false. Removing the
pass-through line turns the first red (expected undefined to be true), so the test pins
the behaviour rather than the shape.

AGENT GENERATED

A shipped agent opts into the usage surface with `providerUsage`, but the custom-agent
schema is strict and has no such field, so an agent configured through `customAgents` can
never appear there — even when it runs the very CLI a shipped agent runs and the bridge
already knows how to read its usage.

That is the common shape for a custom entry: the same agent launched differently. Ours
runs Cursor with an explicit `--agent-endpoint` so its traffic goes through a credential
hub rather than straight to the vendor; it is `dialect: "cursor"` in every other respect,
including the usage the bridge can fetch for it. Today that card is simply blank, with no
way to say otherwise.

Adds the field and passes it through to the definition. Default is unchanged: an entry
that does not ask for it stays off the usage surface.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @OXI-717 for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval.

@github-actions github-actions Bot closed this Sep 18, 2026
@SawyerHood SawyerHood reopened this Sep 18, 2026
@SawyerHood
SawyerHood merged commit 232c8c8 into get-bb:main Sep 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants