Incorrect token usage #3501

Closed
opened 2026-02-16 17:40:22 -05:00 by yindo · 3 comments
Owner

Originally created by @southseact-3d on GitHub (Dec 12, 2025).

Description

When using opencode via the terminal, I dont think it is counting the tokens correctly, it is saying around 50 tokens for a 10 minute task, when i checked in my api dashboard, it was around 75,000 tokens that were used.

OpenCode version

1.0.150

Steps to reproduce

You would just need to send a message

Screenshot and/or share link

Image

Operating System

ubuntu 24.04

Terminal

No response

Originally created by @southseact-3d on GitHub (Dec 12, 2025). ### Description When using opencode via the terminal, I dont think it is counting the tokens correctly, it is saying around 50 tokens for a 10 minute task, when i checked in my api dashboard, it was around 75,000 tokens that were used. ### OpenCode version 1.0.150 ### Steps to reproduce You would just need to send a message ### Screenshot and/or share link <img width="270" height="137" alt="Image" src="https://github.com/user-attachments/assets/ad1dd2f8-e119-4585-b9bc-34bd6295c2e3" /> ### Operating System ubuntu 24.04 ### Terminal _No response_
yindo added the bug label 2026-02-16 17:40:22 -05:00
yindo closed this issue 2026-02-16 17:40:22 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 12, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3322: web and tui reports token usage differently - TUI token counting logic differs from web version
  • #2020: bug: token cost seems inaccurate - similar concern about token count discrepancies

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 12, 2025): This issue might be a duplicate of existing issues. Please check: - #3322: web and tui reports token usage differently - TUI token counting logic differs from web version - #2020: bug: token cost seems inaccurate - similar concern about token count discrepancies Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

what provider are you using? The token calculation comes from the data they send back but maybe its bugged

@rekram1-node commented on GitHub (Dec 12, 2025): what provider are you using? The token calculation comes from the data they send back but maybe its bugged
Author
Owner

@southseact-3d commented on GitHub (Dec 13, 2025):

it seems to have been fixed with 1.0.152

@southseact-3d commented on GitHub (Dec 13, 2025): it seems to have been fixed with 1.0.152
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3501