StatusLine should expose API usage/quota information in JSON input

Resolved 💬 13 comments Opened Aug 12, 2025 by FutureAtoms Closed Feb 5, 2026

Issue Type: Feature Request / Enhancement

Description:
The Claude Code CLI internally tracks API usage limits and displays warnings like "Approaching usage limit •
resets at 7pm" in the terminal interface. However, this usage information is not exposed through the statusLine
JSON input, preventing users from displaying quota information in custom status lines.

Current Behavior:

  • Claude Code tracks usage internally and shows warnings when limits are approached
  • StatusLine scripts receive JSON input with workspace information but no usage data
  • Users cannot display remaining quota or reset times in their custom status lines

Expected Behavior:
The JSON input passed to statusLine scripts should include usage information such as:
{
"workspace": { ... },
"usage": {
"requests_remaining": 150,
"total_requests": 1000,
"percentage_used": 85,
"reset_time": "2024-08-12T19:00:00Z",
"next_reset_human": "7pm"
}
}

Use Case:
I want to create a custom statusLine that displays:

  • Remaining token/request quota
  • Time until quota reset
  • Current working directory
  • Git branch name

Currently, I can display the directory and git info, but not the usage data that Claude Code clearly has access
to internally.

Current StatusLine Configuration:
# ~/.claude/statusline-command.sh shows:
Quota: N/A | Reset: N/A | [main] project-folder

Environment:

  • Platform: macOS (Darwin 24.6.0)
  • Claude Code version: [current version]

Additional Context:
Since Claude Code already tracks and displays this usage information in its own interface, exposing it through
the statusLine API would allow users to create more informative and useful custom status displays without
requiring separate API calls or workarounds.

View original on GitHub ↗

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