Feature: expose user email/org 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) - Rate limit / 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 (Asia/Shanghai)
Current week (all models)
█████████████████ 34% used
Resets Mar 13 at 11pm (Asia/Shanghai)
Current week (Sonnet only)
█████ 10% used
Resets Mar 13 at 11pm (Asia/Shanghai)
None of this quota data is exposed to the status line script.
Current status line 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: hardcode user because JSON has no user field
if [[ "$HOME" == */claude-dev ]]; then
user="dev"
else
user="aaron"
fi
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: aaron · opus 4.6 · 79% ctx · ~/ai/armatrix
Desired output: aaron@0xdefi · opus 4.6 · 79% ctx · 7% session · 34% week · ~/ai/armatrix
Proposed JSON fields
1. User info
{
"user": {
"email": "aaron@0xdefi.club",
"organization": "0xdefi",
"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. 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
Status line refresh for orchestration
Currently status line only refreshes on events (API response, mode switch). During orchestration, the leader session may be idle while agents work. A configurable poll interval (e.g. "refreshInterval": 30) would enable near-real-time monitoring.
4 Comments
Additional request: expose rate limit / usage quota in status line JSON
The
/status→ Usage tab shows the account-level usage quota (the one that auto-resets every 5 hours). This would also be very useful in the status line JSON.Proposed additional fields
Use case
Displaying both metrics in the status line:
Example:
aaron · opus 4.6 · 79% ctx · 72% quota · ~/ai/armatrixThis helps users decide when to start new sessions or switch to lighter models before hitting rate limits.
Additional request: periodic / push-based refresh for status line
Currently the status line only refreshes on events (API response, mode switch). This is fine for single-session interactive use, but insufficient for agent orchestration scenarios:
Why event-driven refresh isn't enough
TeamCreate, quota burns fast. The leader/orchestrator session may be idle (waiting for agents to finish) — its status line never refreshes, so quota data goes stale.Proposed options
"statusLine": { "refreshInterval": 30 }(seconds). Script re-runs periodically even without user interaction.Option 1 is the simplest and would cover most needs. Even a 30-second poll would be a huge improvement over "only on API response".
Closing in favor of a cleaner repost. This issue contained personal information that should have been anonymized.
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.