opencode
opencode copied to clipboard
session-cost/spent-value under reported for sessions with 100+ messages
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
- Start a new session with a paid model.
- Continue conversation until you have > 100 messages (requires iterative work over several hours/days).
- Check the spent value displayed in the sidebar.
- 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