Skip to content

Show estimated thread usage in /status - #38281

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/49300914b3fba917c0f08e8595363e04e5ba6d37
Aug 13, 2026
Merged

Show estimated thread usage in /status#38281
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/49300914b3fba917c0f08e8595363e04e5ba6d37

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 13, 2026

Copy link
Copy Markdown

Show estimated thread usage in /status

What changed

  • Extend account/usage/read with an optional threadId request and a
    backward-compatible threadUsage response containing estimated credits,
    optional USD cost, and model, reasoning, speed, and token breakdowns.
  • Fetch thread usage for eligible Business and Enterprise plans when /status
    is opened, then update the rendered status card asynchronously.
  • Preserve terminal scrollback when replacing a visible status-card tail, and
    append a refreshed card when the original tail can no longer be updated.

Testing

  • Add app-server coverage for authentication, canonical thread IDs,
    unavailable billing routes, and malformed IDs.
  • Add TUI coverage for usage formatting, stale responses, retries, history
    updates, terminal reflow, and scrollback preservation.

## What changed

- Extend `account/usage/read` with an optional `threadId` request and a
  backward-compatible `threadUsage` response containing estimated credits,
  optional USD cost, and model, reasoning, speed, and token breakdowns.
- Fetch thread usage for eligible Business and Enterprise plans when `/status`
  is opened, then update the rendered status card asynchronously.
- Preserve terminal scrollback when replacing a visible status-card tail, and
  append a refreshed card when the original tail can no longer be updated.

## Testing

- Add app-server coverage for authentication, canonical thread IDs,
  unavailable billing routes, and malformed IDs.
- Add TUI coverage for usage formatting, stale responses, retries, history
  updates, terminal reflow, and scrollback preservation.

GitOrigin-RevId: 49300914b3fba917c0f08e8595363e04e5ba6d37
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/49300914b3fba917c0f08e8595363e04e5ba6d37 branch from 74abb25 to f1a1fce Compare August 13, 2026 00:30
@copyberry
copyberry Bot merged commit f1a1fce into main Aug 13, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/49300914b3fba917c0f08e8595363e04e5ba6d37 branch August 13, 2026 00:32
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant