openclaw - 💡(How to fix) Fix feat: Customizable TUI Statusline

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • Connection state (connecting/running/streaming/idle/error)

Code Example

{
  "tui": {
    "statusline": {
      "format": "{agent}/{session} | {model} | {tokens} | {thinking} | {status}",
      "showTokens": true,
      "showThinking": true,
      "showStatus": true,
      "showProvider": false,
      "showSessionAge": false,
      "showCost": false,
      "separator": " | ",
      "customText": ""
    }
  }
}

---

{model} | {tokens}

---

[{agent}:{session}] {model} | {tokens} ({tokensPercent}%) | think:{thinking} | {status}

---

{model} | {tokens} | cost: {cost} | {status}
RAW_BUFFERClick to expand / collapse

Feature Request: Customizable TUI Statusline

Problem

The TUI statusline (footer) is currently auto-generated and hardcoded. Users cannot customize what information is displayed or how it's formatted.

Current Behavior

The TUI footer shows:

  • Connection state (connecting/running/streaming/idle/error)
  • Current Agent
  • Current Session
  • Model name
  • Token usage (formatTokens)
  • Thinking/Fast/Verbose/Trace/Reasoning state
  • Deliver state

Desired Behavior

Allow users to customize the TUI statusline through configuration, enabling them to:

  1. Choose which information to display
  2. Rearrange the order of elements
  3. Add custom text or separators
  4. Optionally hide certain elements
  5. Show additional context like:
    • Session age / last activity time
    • Cost estimation (input/output costs)
    • Model provider info
    • Custom workspace/project info

Proposed Configuration

Add a tui.statusline section to openclaw.json or a dedicated ~/.openclaw/tui.json:

{
  "tui": {
    "statusline": {
      "format": "{agent}/{session} | {model} | {tokens} | {thinking} | {status}",
      "showTokens": true,
      "showThinking": true,
      "showStatus": true,
      "showProvider": false,
      "showSessionAge": false,
      "showCost": false,
      "separator": " | ",
      "customText": ""
    }
  }
}

Available Placeholders

  • {agent} - Current agent name
  • {session} - Current session key
  • {model} - Model name (e.g., mimo/mimo-v2.5)
  • {modelShort} - Short model name (e.g., mimo-v2.5)
  • {provider} - Model provider
  • {tokens} - Token usage (e.g., 12.5k/128k)
  • {tokensPercent} - Token usage percentage
  • {inputTokens} - Input tokens only
  • {outputTokens} - Output tokens only
  • {thinking} - Thinking level
  • {status} - Connection status
  • {sessionAge} - Time since last activity
  • {cost} - Estimated cost (if available)
  • {timestamp} - Current time
  • {customText} - User-defined static text

Example Formats

Minimal:

{model} | {tokens}

Detailed:

[{agent}:{session}] {model} | {tokens} ({tokensPercent}%) | think:{thinking} | {status}

With cost:

{model} | {tokens} | cost: {cost} | {status}

Use Cases

  1. Power users want quick visibility into token usage without /status
  2. Cost-conscious users want real-time cost estimation
  3. Multi-agent users want clear agent/session distinction
  4. Developers want session age for context relevance
  5. Teams want custom branding/separators

Technical Notes

  • The SessionInfo type already has contextTokens, inputTokens, outputTokens, totalTokens, model, modelProvider
  • The formatTokens() and formatContextUsageLine() functions exist but are currently internal
  • Adding a config option would require:
    1. Schema update in config
    2. TUI formatter to read config and render custom format
    3. Fallback to current auto-format if no config exists

Related

  • Current footer code: tui-formatters.ts / tui-status-summary.ts
  • Session info: SessionInfo type in tui-types.d.ts
  • Config path: tui.statusline (new)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING