Skip to content

/status shows incorrect context percentage (150k/150k = 100% when actual is ~31%) #15114

@IntrepidBytes

Description

@IntrepidBytes

Description: The /status command shows incorrect context percentage. It displays 150k/150k (100%) when the actual tokens used is only ~31% (46k tokens).

Steps to reproduce:

  1. Have a session with ~46k tokens used (out of 150k context window)
  2. Run /status in the chat
  3. Observe: shows 150k/150k (100% instead of 46k/150k (31%)

Expected behavior:

  • Should show the actual tokens used (e.g., 46k) divided by context window (150k), which is ~31%

Actual behavior:

  • Shows context window (150k) as both used and total, resulting in 100%
  • The correct totalTokens value is 46167 in sessions.json

Environment:

  • OpenClaw 2026.2.9
  • MiniMax-M2.5 model
  • Context window: 150k tokens

Additional data:

  • sessions.json shows: totalTokens: 46167, contextTokens: 150000
  • Gateway status shows correct: totalTokens: 33139 (31%)
  • The /status command appears to be pulling contextTokens value instead of totalTokens for the percentage calculation

Impact:

  • Misleading information about session state
  • Could trigger unnecessary panic or compaction requests

Metadata

Metadata

Assignees

No one assigned

    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