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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗