Skip to content

TUI displays Context Tokens as ?/200k instead of actual value #43009

Description

@ltxy12138-ai

Bug Description

OpenClaw TUI interface continuously displays tokens ?/200k, but the actual API returns correct values (e.g., 0/200k (0%)).

Reproduction Steps

  1. Start OpenClaw TUI (openclaw tui)
  2. Have multiple conversation turns
  3. Observe the tokens display in the top status bar

Expected Behavior

Display actual token usage, e.g., 1.2k/200k (1%)

Actual Behavior

Always displays ?/200k

Environment

  • OpenClaw Version: 2026.3.8 (3caab92)
  • Model: qwencode/qwen3.5-plus
  • Compactions: 2
  • Issue persists after Gateway restart

Additional Context

  • session_status API returns correct value: Context: 0/200k (0%)
  • Issue is in TUI display layer only, functionality is not affected
  • Gateway restart does not fix the display issue

Possible Cause

The TUI client may not be correctly parsing or displaying the context token count from the Gateway API response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions