[FEATURE] Include Token Usage in Status Line JSON

Resolved 💬 2 comments Opened Oct 27, 2025 by max-oberbrunner Closed Oct 27, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Add token usage information to the JSON input provided to custom status line commands, allowing users to display conversation token counts in their status line.

Current Behavior: The JSON passed to statusLine.command includes:

  • session_id, cwd, model, workspace, cost
  • exceeds_200k_tokens (boolean flag)

Proposed Solution

Add token usage fields to the JSON:
{
"tokens": {
"used": 39583,
"total": 200000,
"remaining": 160417
},
// ... existing fields
}

Alternative Solutions

Currently only exceeds_200k_tokens is available, which is binary and provides limited visibility.

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

Users want to monitor conversation length directly in their status line (e.g., 🎯 40K/200K or 20%) to:

  • Know when to start fresh conversations
  • Track context window usage in real-time
  • Avoid hitting token limits unexpectedly

Additional Context

Token usage is already visible in system messages (<budget:token_budget>) during conversations, so this data exists internally and could be exposed to status line scripts.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗