Feature: expose user account info and usage quota in status line JSON
Summary
The status line script receives JSON via stdin with fields like model, context_window, cost, workspace, etc. However, two important categories of data are missing:
- User account info — email, organization, login method (visible in
/statusbut not in status line JSON) - Usage quota — three levels of quota visible in
/status→ Usage tab but NOT in status line JSON
Current available data vs what /status shows
| Data | In /status? | In status line JSON? |
|------|:---:|:---:|
| Model name | ✅ | ✅ |
| Context window % | ✅ | ✅ |
| Session cost | ✅ | ✅ |
| User email | ✅ | ❌ |
| Organization | ✅ | ❌ |
| Session quota (resets daily) | ✅ | ❌ |
| Weekly quota (all models) | ✅ | ❌ |
| Weekly quota (Sonnet only) | ✅ | ❌ |
What /status → Usage actually shows
Current session
███▌ 7% used
Resets 1am (timezone)
Current week (all models)
█████████████████ 34% used
Resets Mar 13 at 11pm (timezone)
Current week (Sonnet only)
█████ 10% used
Resets Mar 13 at 11pm (timezone)
None of this quota data is exposed to the status line script.
Current workaround (statusline script)
#!/usr/bin/env bash
input=$(cat)
model=$(echo "$input" | jq -r '.model.display_name // empty' | tr '[:upper:]' '[:lower:]')
remaining=$(echo "$input" | jq -r '.context_window.remaining_percentage // empty')
cwd=$(echo "$input" | jq -r '.workspace.current_dir // empty')
home_escaped=$(printf '%s\n' "$HOME" | sed 's/[[\.*^$()+?{|]/\\&/g')
short_dir=$(echo "$cwd" | sed "s|^${home_escaped}|~|")
dim="\033[38;5;242m"
reset="\033[0m"
# WORKAROUND: have to hardcode user because JSON has no user field
user="alice"
parts=()
[ -n "$user" ] && parts+=("$user")
[ -n "$model" ] && parts+=("$model")
[ -n "$remaining" ] && parts+=("$(printf '%.0f' "$remaining")% ctx")
# MISSING: would love to show "7% session · 34% week" here
[ -n "$short_dir" ] && parts+=("$short_dir")
result=""
for part in "${parts[@]}"; do
if [ -z "$result" ]; then result="$part"; else result="$result · $part"; fi
done
printf "${dim}%s${reset}\n" "$result"
Current output: alice · opus 4.6 · 79% ctx · ~/projects/myapp
Desired output: alice@acme · opus 4.6 · 79% ctx · 7% session · 34% week · ~/projects/myapp
Proposed JSON fields
1. User info
{
"user": {
"email": "alice@acme.com",
"organization": "acme",
"login_method": "Claude Team Account"
}
}
2. Quota (all three levels)
{
"quota": {
"session": {
"used_percentage": 7,
"remaining_percentage": 93,
"resets_at": "2026-03-10T01:00:00+08:00"
},
"weekly_all_models": {
"used_percentage": 34,
"remaining_percentage": 66,
"resets_at": "2026-03-13T23:00:00+08:00"
},
"weekly_sonnet": {
"used_percentage": 10,
"remaining_percentage": 90,
"resets_at": "2026-03-13T23:00:00+08:00"
}
}
}
Use cases
Multi-account disambiguation
Running multiple Claude Code instances with different accounts (e.g. personal vs team). Without user info in JSON, must hardcode usernames — fragile and not portable.
Rate limit awareness (interactive)
Knowing quota remaining helps decide when to switch models or pause before hitting limits.
Agent orchestration (critical)
When running multi-agent workflows (5+ parallel agents via TeamCreate):
- Each agent consumes quota independently
- Leader/orchestrator needs real-time quota visibility to throttle or redistribute work
- Without quota data, agents can unknowingly exhaust the entire quota window
- All three quota levels matter: session quota for immediate decisions, weekly quota for sprint planning
Additional: periodic refresh option
Currently status line only refreshes on events (API response, mode switch). During orchestration, the leader session may be idle while agents work — its status line never refreshes so quota data goes stale.
Proposed: A configurable poll interval, e.g. "statusLine": { "refreshInterval": 30 } (seconds), so the script re-runs periodically even without user interaction. Even a 30-second poll would be a big improvement for orchestration use cases.
Investigation notes
Confirmed that the quota data exists in the Claude Code process memory (found session limit, weekly limit, used_percentage, remaining_percentage in the binary). It comes from API response headers and is displayed in /status → Usage. However it is not persisted to disk, not in transcript files, and not exposed via any external interface. The only way to surface it is for Claude Code to include it in the status line JSON input.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗