Add opus_usage_percentage to status line JSON data

Resolved 💬 4 comments Opened Mar 25, 2026 by Moworks Closed Apr 24, 2026

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

Custom status line scripts need access to the actual model usage percentage to display accurate usage
information

Currently, custom status line scripts (configured via settings.json) receive JSON data
that includes tokens_used, token_budget, model info, etc., but NOT the actual Opus
daily quota usage percentage.

When running /usage, we can see "Current session X% used", but this data isn't
available to status line scripts.

Request: Please add opus_usage_percentage field to the JSON passed to custom
status line commands, so we can display accurate model usage in custom status bars.

Use case: Users want to monitor their Opus usage without repeatedly running /usage

  1. Direct Support - If you have access to Anthropic support channels through your account

Proposed Solution

Add the usage data to the JSON object passed to custom status line scripts:

Current JSON structure (passed to status line scripts):
```json
{
"display_name": "Opus 4.1",
"current_dir": "/home/user/projects",
"tokens_used": 50000,
"token_budget": 200000,
...
}

Proposed JSON structure (with usage data added):
{
"display_name": "Opus 4.1",
"current_dir": "/home/user/projects",
"tokens_used": 50000,
"token_budget": 200000,
"opus_usage_percentage": 77,
"opus_usage_reset_time": "11:59am (America/Los_Angeles)",
"approaching_limit": true,
...
}

New fields:

  • opus_usage_percentage: Current session usage percentage (0-100)
  • opus_usage_reset_time: When the usage resets
  • approaching_limit: Boolean flag when usage > 75%

Implementation benefits:

  1. Custom status line scripts can display accurate, real-time usage
  2. Users can create visual warnings when approaching limits
  3. Consistent with the data shown by /usage command
  4. Minimal implementation effort - data already tracked internally

Example usage in status line script:
opus_usage=$(echo "$input" | grep -o '"opus_usage_percentage":[0-9]' | sed 's/.://')
echo "Opus: $opus_usage% used"

This would allow users to create informed status bars without manually checking /usage.

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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