Skip to content

[The Framework] Report an agent's token usage when it reports no price #540

Description

@suleimansh

Follow-up to #539.

Claude Code reports a price per turn; Codex reports token counts and no price. Our per-turn usage requires costUsd, so the Codex driver currently omits usage entirely rather than claim a run cost $0 — which would read as free rather than as "we don't know".

The cost of that: a Codex run shows no tokens at all, and the spend cap (#322) never gates it.

Options:

  • Make the price optional on the usage type, so tokens can be reported without one. Ripples into the meter, the events, and the dashboard, all of which assume a number.
  • Price the tokens ourselves from a per-model table. Accurate-ish, but it's a number we invented, and it goes stale.
  • Leave it. A Codex run stays unmetered and uncapped.

Whichever we pick, a Codex run is less guarded than a Claude one, and the UI should say so rather than let people assume the cap applies.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions