anthropics / anthropics/claude-code
Expose current auth method (subscription vs API key) in status line payload
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 147k
- Forks
- 24k
- PR merge metrics
- PR metrics pending
Description
Feature request
Currently the status line JSON payload (session_id, cwd, model, workspace, version, cost, context_window, output_style, exceeds_200k_tokens) has no field indicating whether the active session is authenticated via a Pro/Max subscription login or via ANTHROPIC_API_KEY (pay-as-you-go).
Why this matters
Per the documented auth precedence, ANTHROPIC_API_KEY silently overrides an active subscription login when both are present. Today the only way to check which credential is actually in use is running /status manually. For users who deliberately set ANTHROPIC_API_KEY temporarily (e.g., prefixing a single command to burn through a subscription usage spike via pay-as-you-go), there's no persistent, glanceable indicator of which billing mode is active — making it easy to lose track and unintentionally rack up API charges in a later session, or conversely think you're on API billing when you're actually still on the subscription.
Request
Add a field to the statusLine payload (e.g., auth_mode: "subscription" | "api_key", or similar) so a custom status line script can display it, the same way cost and model are already surfaced.
Related: #24679 (requesting account/email in the payload) was closed as a duplicate — this request is specifically about auth method, not account identity, so filing separately.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the statusLine JSON payload is assembled and how /status determines the active authentication method. Add a field distinguishing subscription login from ANTHROPIC_API_KEY, then verify that custom status line scripts receive the value alongside fields such as cost and model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100