Skip to content

provider-acp drops usage_update.cost (stable spec field); cursor threads show cost unknown #3941

Description

@nzhu-link

Symptom

Threads on the acp-cursor provider show cost as unknown. The thread event log (260 events checked via bb thread log --format json) contains zero thread/tokenUsage/updated events and zero token counts anywhere; turn/completed carries only {providerThreadId, status}.

Root cause (bb's half)

The provider-acp bridge translates ACP usage_update into a contextWindow record only (used/size) and ignores the rest. The installed bundle's handler (provider-acp/dist/host.js, case "usage_update") returns {kind: "contextWindow", used, size, estimated: false, ...} — no token usage, no cost. The zod schema uses .passthrough(), so a cost field would survive parsing; it is simply never read.

Meanwhile the protocol already supports what is needed: usage_update with optional cumulative cost {amount, currency} was stabilized in June 2026 (https://agentclientprotocol.com/announcements/session-usage-stabilized, RFD https://agentclientprotocol.com/rfds/session-usage). There is also the experimental end-turn PromptResponse.usage token-count channel. The other bridges (claude-code, codex, pi) all report token usage; only the ACP bridge does not.

The other half (not bb's to fix)

cursor-agent currently sends no usable usage on the wire at all — no contextWindowUsage/updated events either — so even after bb consumes cost, Cursor has to send it (only their billing has the number). Two-party fix; this issue tracks bb's half.

Ask

  • Consume usage_update.cost into the thread cost display when present (keep showing unknown when absent — that part is correct behavior).
  • Consider the experimental PromptResponse.usage channel for token counts so ACP threads get real cost, not just session totals.

Environment

  • bb-app 0.40.0, provider acp-cursor
  • cursor-agent 2026.09.18-9a7762b

Activity

  1. added
    providers
    provider-acp
    on Sep 21, 2026
  2. bb-slop-cop commented on Sep 21, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied Type Feature, Priority Medium, Effort Medium, and labels providers, provider-acp. All values were missing; no existing classifications were replaced. Verified the final Type after writing.

    The trusted main-branch ACP translation test explicitly supplies cost and expects only context-window usage. Supporting monetary usage extends the existing contract, consistent with related Feature #2397. Medium priority reflects limited provider scope; medium effort reflects translation and downstream accounting work.

    No report or pull request: the rule skips those steps for non-Bug issues.

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-acpproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions