[Session Sidebar] Token usage state not refreshed till /compact + 1 #9417

Open
opened 2026-02-16 18:12:24 -05:00 by yindo · 2 comments
Owner

Originally created by @tadghh on GitHub (Feb 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The token usage state does not update till the next message is sent after running /compact

Plugins

No response

OpenCode version

v1.2.3

Steps to reproduce

  1. enter some prompts
  2. check token usage in the sidebar
  3. run /compact
  4. Look in the session sidebar, it will be the same
  5. enter another message
  6. token usage is updated

Screenshot and/or share link

No response

Operating System

N/A

Terminal

N/A

Originally created by @tadghh on GitHub (Feb 15, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description The token usage state does not update till the next message is sent after running /compact ### Plugins _No response_ ### OpenCode version v1.2.3 ### Steps to reproduce 1. enter some prompts 2. check token usage in the sidebar 3. run /compact 4. Look in the session sidebar, it will be the same 5. enter another message 6. token usage is updated ### Screenshot and/or share link _No response_ ### Operating System N/A ### Terminal N/A
yindo added the bug label 2026-02-16 18:12:24 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):

This issue might be a duplicate of #5760: Context size in sidebar not updated after /compact

Both report the same issue where sidebar information (token usage in this case, context size in #5760) doesn't refresh immediately after running /compact—it only updates after the next message is sent.

@github-actions[bot] commented on GitHub (Feb 15, 2026): This issue might be a duplicate of #5760: [Context size in sidebar not updated after /compact](https://github.com/anomalyco/opencode/issues/5760) Both report the same issue where sidebar information (token usage in this case, context size in #5760) doesn't refresh immediately after running /compact—it only updates after the next message is sent.
Author
Owner

@tadghh commented on GitHub (Feb 15, 2026):

This issue might be a duplicate of #5760: Context size in sidebar not updated after /compact

Both report the same issue where sidebar information (token usage in this case, context size in #5760) doesn't refresh immediately after running /compact—it only updates after the next message is sent.

take a break from your duties. You may fix this bug as a reward

@tadghh commented on GitHub (Feb 15, 2026): > This issue might be a duplicate of [#5760](https://github.com/anomalyco/opencode/issues/5760): [Context size in sidebar not updated after /compact](https://github.com/anomalyco/opencode/issues/5760) > > Both report the same issue where sidebar information (token usage in this case, context size in [#5760](https://github.com/anomalyco/opencode/issues/5760)) doesn't refresh immediately after running /compact—it only updates after the next message is sent. take a break from your duties. You may fix this bug as a reward
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9417