[PR #4709] feat: show live token usage during streaming #11076

Closed
opened 2026-02-16 18:15:52 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4709

State: closed
Merged: No


Token counts only showed up after messages finished, so you had no idea how many tokens were being used until it was done.

Now token usage shows live while streaming:

  • IN↓/OUT↑ format shows what you're sending vs receiving

  • ~X tok estimates appear immediately and update in real-time

  • ~X think shows reasoning token usage separately

  • Tool results are now properly counted when sent back to the API

  • Added sentEstimate and contextEstimate fields to track what's actually being sent

Makes it way easier to keep an eye on token budget instead of being surprised at the end.

Showcase

user-tokens-showcase

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4709 **State:** closed **Merged:** No --- Token counts only showed up after messages finished, so you had no idea how many tokens were being used until it was done. Now token usage shows live while streaming: - `IN↓/OUT↑` format shows what you're sending vs receiving - `~X tok` estimates appear immediately and update in real-time - `~X think` shows reasoning token usage separately - Tool results are now properly counted when sent back to the API - Added `sentEstimate` and `contextEstimate` fields to track what's actually being sent Makes it way easier to keep an eye on token budget instead of being surprised at the end. ## Showcase ![user-tokens-showcase](https://github.com/user-attachments/assets/e1c11c50-f7f4-4c7f-a395-9f8da2a68818)
yindo added the pull-request label 2026-02-16 18:15:52 -05:00
yindo closed this issue 2026-02-16 18:15:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11076