Skip to content

[FEATURE] Include Token Usage in Status Line JSON #10436

Closed

Description

@max-oberbrunner

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • 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.

Activity

  1. github-actions commented on Oct 27, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [FEATURE] Expose /usage data in statusLine JSON input #8464
    2. [FEATURE] Add token usage details to status line API #8861
    3. Feature Request: Add Token Usage To Status Line Input #6216

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. github-actions commented on Nov 4, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions