Workflow
AI Workflows

Which Account Paid for My Claude Code Session?

Nov 19, 2026|
AL
Automation Lab

Trace a Claude Code session to a subscription, API key, or cloud account. Check the active login and match the time to the right usage report.

Open the Claude Code session you’re investigating and run /status if it’s a terminal session. Note the active sign-in method and provider. Then open the usage report for that account and match the time of the work. These two checks answer different questions: how the client is connected now, and which account recorded usage when the work happened. The dollar estimate beside a session can’t settle the second question.

Start with the session where the work happened

Before you sign out or start another chat, write down the client, the approximate start and end times with time zone, and the model if you know it. Record whether you typed prompts in a terminal, used the Code tab in Claude Desktop, or launched a script. A desktop app and a terminal open on the same computer can use different credentials.

For a terminal session, look at /status in the original window. If it shows a Claude subscription, start with the usage view for that personal account or team. If it shows Claude Console or a direct API key, start with the Console organization that owns the credential. If it names a cloud provider such as Amazon Bedrock, ask the owner of that cloud account for its billing report. For a company gateway, ask the gateway administrator which account supplied the model for your request.

If the session has ended, label any check you run in a new window as a check of the current setup. You can still investigate the earlier period through the provider’s records.

Check an API key without revealing it

In an interactive Claude Code CLI session, an environment key named ANTHROPIC_API_KEY can take priority over a subscription login once you approve its use. The CLI remembers that choice. With the variable present, the “Use custom API key” option in /config lets you inspect the choice. A script using claude -p can use an available key without the interactive prompt. Managed gateways, cloud providers and other credentials can change which route wins.

To see whether a nonempty key is available to programs launched from your current shell, run the appropriate line outside Claude Code. Both commands output only a presence indicator.

macOS or Linux with a POSIX-style shell

if [ -n "${ANTHROPIC_API_KEY:-}" ]; then echo present; else echo absent; fi

Windows PowerShell

if ($env:ANTHROPIC_API_KEY) { 'present' } else { 'absent' }

“Present” gives you a lead. It doesn’t identify the key’s owner or prove an earlier process used it. An entry sitting in a project’s .env file is weaker evidence still. In particular, Anthropic’s current authentication guide says ordinary Claude Desktop and cloud sessions use OAuth and do not read the CLI key variable. A Desktop session configured for third-party inference uses that configuration’s credentials. If a separate script ran alongside Desktop, check the script’s environment and timing independently.

Match the time to the right report

  1. For a direct API charge, open Usage in the Claude Console organization that owns the key. Select the workspace and date, then narrow to the key by its display name and to the model if known. Click a chart bar to inspect a smaller time interval. Compare times in the same time zone.
  2. Open Cost for the same organization, workspace, model and period to see recorded spending. The Usage view can distinguish keys. A shared key can still represent several people, scripts or apps. Write down the narrowest conclusion the report supports.
  3. For a subscription session, check the account’s plan usage and any enabled paid usage beyond the allowance. In the CLI, /usage displays session and plan information as applicable. Its session dollar figure is computed from tokens and pricing. To establish an actual purchase, use the account’s billing record.
  4. If you are tracing a card transaction, check Billing as well. A prepaid-credit purchase or automatic reload can fund many requests, so its time and amount may differ from those of the coding session. A provider-managed account has its own billing records.

A fictional example with a shared key

Maya worked in the terminal from 10:10 to 10:25 UTC. She sees a card charge at 10:30. In the original terminal, /status shows API-key authentication. Her team’s Console Usage report shows activity on the development key during that interval. Billing identifies the 10:30 transaction as a credit reload. A scheduled test also used the development key at 10:15.

Maya can tell the team which organization recorded API usage and what the card transaction bought. She can’t assign the entire reload, or even all of that interval’s tokens, to her session. To split the usage, she needs an independent record of the scheduled test’s requests. Sending another paid prompt today would tell her little about yesterday’s overlap.

Questions people ask

Can I check the charge if I don’t have Console billing access?

Ask someone with a Developer, Billing or Admin role in the relevant Console organization to check Usage and Cost. Give them the time window, time zone, workspace, model and a key display name if known. They can report whether those filters match activity without sharing a key or exporting other users’ data.

Why would a subscription user see a dollar total after coding?

Claude Code can estimate what the session’s tokens cost at list prices or at rates configured by your organization. A subscription user can see an estimate for work covered by the plan. Check the account’s usage and billing records before treating that figure as an extra charge.

Do the monthly API credits that come with my plan cover Claude Code?

Anthropic distinguishes monthly API credits included with eligible plans from credits purchased in Console. Its billing guide says the included monthly API credits cannot pay for Claude Code, including extra usage. Purchased Console credits can cover Claude Code when you use the Console billing route. Check which credit balance you are reading.

What should I keep if I still can’t identify the payer?

Keep the client and version, the session time window and time zone, the provider shown, and the report filters you checked. Note whether the key was shared and whether another job ran then. Give that summary to the billing owner or support. Leave out credential values, project files and private prompts.

Sources

Anthropic — Claude Code authentication, client differences and credential priority https://code.claude.com/docs/en/authentication

Anthropic — Claude Code session estimates and organization cost tracking https://code.claude.com/docs/en/costs

Claude Help Center — Console Usage and Cost reports https://support.claude.com/en/articles/9534590-cost-and-usage-reporting-in-the-claude-console

Claude Help Center — API billing, monthly credits and purchased credits https://support.claude.com/en/articles/8977456-how-do-i-pay-for-my-claude-api-usage

Community discussions that prompted the question — Desktop billing report and a disputed account of project environment behavior https://github.com/anthropics/claude-code/issues/53638 https://www.reddit.com/r/ClaudeCode/comments/1vdowrl/psa_if_your_projects_env_has_anthropic_api_key/

Keep exploring

Find practical AI assets for your next task

Browse curated collections and ready-to-use AI assets for marketing, sales, project delivery and other goals.