[PR #6313] Separate context window and session stats in sidebar #11830

Closed
opened 2026-02-16 18:16:46 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6313

State: closed
Merged: No


Issue

On some /compact instances the session costs would be reset and the token count isn't ongoing which is nice for visuals.

Summary

  • Split the sidebar Context section into two: Context (current window) and Session (cumulative)
  • Context shows tokens and % used from the last assistant message (resets on compaction)
  • Session shows total tokens across all messages and cumulative spend (only increases)
  • Improves visibility into both current context usage and overall session costs
image

Changes

  • Added sessionTokens memo that sums tokens from all assistant messages
  • Moved spend to Session section alongside total tokens
  • Kept Context section focused on current LLM context window
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6313 **State:** closed **Merged:** No --- ## Issue On some `/compact` instances the session costs would be reset and the token count isn't ongoing which is nice for visuals. ## Summary - Split the sidebar Context section into two: **Context** (current window) and **Session** (cumulative) - Context shows tokens and % used from the last assistant message (resets on compaction) - Session shows total tokens across all messages and cumulative spend (only increases) - Improves visibility into both current context usage and overall session costs <img width="329" height="510" alt="image" src="https://github.com/user-attachments/assets/55a8bb7a-0df1-4d0b-bd52-392b40966595" /> ## Changes - Added `sessionTokens` memo that sums tokens from all assistant messages - Moved spend to Session section alongside total tokens - Kept Context section focused on current LLM context window
yindo added the pull-request label 2026-02-16 18:16:46 -05:00
yindo closed this issue 2026-02-16 18:16:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11830