claude-code - 💡(How to fix) Fix [FEATURE] whoami for claude code - show what account is in use [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47934Fetched 2026-04-15 06:38:10
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

I need to audit my organization to ensure my staff are logged in to claude code using the approved corporate claude account for monitoring and contractual management of data, instead of personal accounts on work assets.

Proposed Solution

I would like to be able to determine what account is being used for claude code billing both programmatically (say, catting a file, examining a keychain, or using a claude command line flag) and within the UI (say, using /whoami) and see what account is associated for billing.

Alternative Solutions

I have looked for this information in keychains, configuration files, and using /status, but none of these are truly adequate for this need.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

Enterprise GRC

  1. I am an enterprise administrator who needs to make sure all claude usage within my organization uses corporate approved credentials bound by corporate contracts for data management, in order to mitigate data loss concerns.
  2. I would use my enterprise software management tools to poll claude code instances to determine what accounts they are logged into
  3. I would be able to enforce only specific accounts by being able to automatically change this setting as needed.

Additional Context

No response

extent analysis

TL;DR

To address the auditing requirement, explore using a command-line flag or API to retrieve the account associated with claude code billing, and consider implementing a centralized management system to enforce corporate account usage.

Guidance

  • Investigate the availability of a claude command-line flag or API that can programmatically retrieve the account information for billing purposes.
  • Examine the feasibility of integrating with enterprise software management tools to poll claude code instances and determine the logged-in account.
  • Consider developing a custom solution to automatically change the account setting as needed, using the proposed API or command-line flag.
  • Evaluate the potential for using a centralized configuration file or keychain to store and manage corporate-approved credentials.

Example

No specific code example can be provided without further information on the claude code API or command-line interface.

Notes

The solution may require collaboration with the claude code development team to implement the necessary API or command-line flag. Additionally, the feasibility of integrating with enterprise software management tools will depend on the specific tools and systems used by the organization.

Recommendation

Apply a workaround by exploring alternative solutions, such as using existing APIs or command-line tools, to retrieve the account information and enforce corporate account usage, as an official feature may not be available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING