Skip to content

[TUI] $ spent in context decreases after request #6989

Closed as not planned
Closed as not planned

Description

@artemkalugin01

Description

I experienced 2 issues with unreliable $ spent in Context block.

Issue №1: Without model(Sonnet 4.5) change new value in $ spent sometimes decreases by a small amount after message processed(~$0.10), can provide no steps on how to reproduce, seemingly random requests.

Issue №2: After changing model from Sonnet 4.5 to Haiku 4.5 and running first message $ spent in context decreased by ~$2, while billing in Zen seems correct (screenshot attached)

Models: Claude Opus 4.5, Claude Sonnet 4.5, Claude Haiku 4.5.
Provider: Zen

Plugins

OpenCode version

1.0.220

Steps to reproduce

  1. Have open session with Claude Sonnet 4.5 selected.
  2. Change model to Claude Haiku 4.5

Expected behavior:
Amount in $ spent increased by correct amount

Actual behavior:
Amount in $ spent decreased by ~$2

Screenshot and/or share link

Image

Operating System

macOS Sonoma 14.1

Terminal

iTerm2

Activity

  1. github-actions commented on Jan 5, 2026

    @github-actions
    Contributor

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

    This appears to be a recurring issue where spending values displayed in the context block don't accurately reflect actual charges on the Zen account, similar to your experience where the $ spent decreased after changing models. Feel free to ignore if your case involves different specifics.

  2. artemkalugin01 commented on Jan 5, 2026

    @artemkalugin01
    Author

    Replying to @github-actions
    Issues #3171 and #4160 seem to be related to my problem although there was no info on decreasing spent amount, only about incorrect billing overall.
    Hope I provided some additional context with this issue

  3. EthanShoeDev commented on Jan 6, 2026

    @EthanShoeDev

    My spent figure dramatically increased: https://x.com/ethan_shumate/status/2008654158342353145?s=20

    I did switch models many times throughout this thread but I think the miscalculation is not always in the negative direction.

    Image
  4. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  5. removed
    bugSomething isn't working
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions