Skip to content

session-cost/spent-value under reported for sessions with 100+ messages #7767

Description

@IdrisGit

Description

The TUI sidebar displays incorrect spent value for sessions that exceed 100 messages. The cost only accumulates from the last 100 messages stored in memory, not from all messages that exist in the session.

Plugins

No response

OpenCode version

1.1.12

Steps to reproduce

  1. Start a new session with a paid model.
  2. Continue conversation until you have > 100 messages (requires iterative work over several hours/days).
  3. Check the spent value displayed in the sidebar.
  4. Compare with actual cost (using Zen dashboard).

Expected: Sidebar shows accurate total cost from all messages including messages that were reverted.
Actual: Sidebar shows cost only from the last ~100 messages.

Screenshot and/or share link

No response

Operating System

Arch Linux (Omarchy)

Terminal

Ghostty

Activity

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