Display logged-in email dynamically in statusline
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
Currently, the statusline can display the logged-in email, but it's hard-coded as a static value in .claude/settings.json. This means if a user switches accounts, the email in the statusline doesn't update automatically.
The email is directly embedded in the shell command string, making it impossible for users managing multiple Claude Code accounts to see at a glance which account they're currently logged into.
Proposed Solution
The email should be sourced dynamically from the active session data (already available in the CLI session object) rather than hard-coded in settings.json. When the statusline renders, it should fetch the current login email from the session context and display it alongside the model name and context percentage.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
When a user logs into a different Claude Code account, the email in the statusline should automatically update to reflect the currently logged-in account—without requiring manual reconfiguration of .claude/settings.json.
Example:
- Log in as
user1@example.com→ statusline shows:claude-opus-4-5 | 42% context | user1@example.com - - Log in as
user2@example.com→ statusline automatically updates to:claude-opus-4-5 | 42% context | user2@example.com
The email should be sourced dynamically from the active session data (already available in the CLI session object), rather than hard-coded in settings.json. This would allow the statusline to render the correct email based on the current login context.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗