Feature request: Include session's account email in status line JSON input
Problem
When users switch between multiple accounts (personal vs work), they'd like to see which account the current session is using in the status line.
Currently, the JSON input passed to the status line command includes model, workspace, cost, and context_window data, but not the authenticated account information.
Reading from ~/.claude.json's oauthAccount.emailAddress doesn't work correctly because that file is shared across all sessions:
- User has Session A logged into Account A
- User opens Session B and does
/loginto switch to Account B ~/.claude.jsonnow shows Account B- Session A's status line would incorrectly show Account B, even though it's still using Account A's token
Proposed solution
Add an auth or account field to the status line JSON input that contains the current session's actual authenticated email:
{
"auth": {
"email": "user@example.com"
}
}
This would allow users who switch between accounts to accurately display which account each session is using in their custom status line.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗