opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open IdrisGit opened this issue 4 days ago • 1 comments

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

IdrisGit avatar Jan 11 '26 08:01 IdrisGit