For SDK agent runs, return measured input/output tokens on every completion — including tool-gather context, with cache-read vs net-input split documented. Estimates aren’t enough for cost attribution or reselling compute.
Why: You said it — if you’re billing per token, “we estimate from word count + sometimes stream-probe catches real numbers” is a non-starter. Our sidecar labels much of this estimated; Pro-pool billing is opaque. Business blocker.
Bonus (smaller): stable x_context_tokens_remaining or equivalent in the run stream — even one number would unblock dashboard pressure bars we currently calibrate by hand.
We looked into it on a Pro plan. The endpoint works for Cursor’s cloud-hosted agents, but we’re on local Composer runs, which don’t show up under /v1/agents/{id}/usage. The Admin API that would give account-wide metering needs an Enterprise admin key - a much bigger tier jump than we can justify for this. Reconciling against dashboard CSV exports for now. Appreciate the pointer.
Per-run accounting would be much more useful than only seeing aggregate usage.
For agent work, the unit people actually reason about is “this task cost X,” not “this account used Y today.” If the log could tie model, files touched, tool calls, retries, and final status to one run, it would be much easier to decide which workflows are worth using heavier models for.