Skip to content

[FEATURE]: Enhance Message List Details & Fix Cost/Token Statistics Logic #17056

Closed as not planned

Description

@SunYanbox

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like to propose two specific improvements to the OpenCode interface:

  1. Refine the "Original Messages" (Context) UI:

    • Currently, the message list shows full IDs which can be cluttered. I suggest collapsing the message ID prefix by default and providing a toggle button to switch between showing/hiding the detailed token metrics for each message (Input Tokens, Output Tokens, Thinking Tokens, Cache Input, Cache Output). This would make the log cleaner while keeping data accessible when needed.
  2. Fix the Statistical Data Logic (Cost & Token Usage):

    • Current Issue: The statistics page currently displays data that seems to represent only the last message processed or an incomplete snapshot.
    • Problem: In actual API billing models (like DeepSeek or others), costs are incurred on every interaction, not just the final one. Relying on the last message's data gives a misleading view of total consumption.
    • Proposed Solution: The statistics page should prioritize displaying the cumulative (total) Token consumption and cost across the entire session. It needs to aggregate data from all messages in the context, rather than just showing the stats for the most recent turn.

Benefits of Implementation

  • Improved Usability: Collapsing long IDs and making token details collapsible will significantly reduce visual noise in the conversation history, making it easier to scan through logs without losing access to granular data.
  • Accurate Cost Analysis: By aggregating the data correctly, users will see the true total cost of their session. This is crucial for budget management and understanding the actual price impact of complex multi-turn conversations or tool usage.
  • Better Debugging: Seeing the breakdown of tokens per message helps developers identify exactly where the high costs or latency are coming from (e.g., is it the tool calls? The thinking process?).

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 11, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 11, 2026
  3. github-actions commented on Mar 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues and consider whether your request can be addressed there, or clarify how your proposal differs.

  4. SunYanbox commented on Mar 11, 2026

    @SunYanbox
    Author

    Distinction from Existing Issues

    This proposal differs significantly from several existing feature requests in scope and focus:

    • Vs. Near-Real-Time Token and Cost Visibility:
      Unlike that request, my primary focus is on ensuring the API key usage statistics display actual Token consumption rather than potentially inaccurate cost projections. Furthermore, I am requesting a modification to the Context page's logic so that it aggregates and prioritizes the cumulative total of all token usage across the entire session—including User inputs, Tool calls, Agent interactions, and Sub-Agent activities—rather than displaying isolated or partial metrics.

    • Vs. Session-specific stats command and exit summary:
      While that issue focuses on CLI commands and terminal summaries, my request specifically targets the GUI interface. I aim to improve how statistical data is visualized and presented directly within the graphical user interface for better immediate visibility.

    • Vs. Show tool usage breakdown in context window:
      This is entirely distinct from the previous request. My initial intent was not focused on internal tool call details. However, I acknowledge that if the implementation allows for viewing detailed breakdowns of internal tool usage as part of this aggregation, it would be a valuable bonus feature.

  5. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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