
I got a "Credit balance too low" error even though I'm subscribed to the Claude Max plan
This page has been translated by machine translation. View original
Hello, I'm Masaoka from the AI Business Division, Generative AI Integration Department, West Japan Development Team.
I recently attended the "Claude Managed Agents Workshop" held in Osaka.
During the hands-on session, I went through the full range of Claude Managed Agents features.
I was able to try out parts I don't normally touch in everyday use, making it a very educational workshop.
A few weeks later, while using Claude Code as usual, the following message suddenly appeared.
Credit balance too low · Add funds: https://platform.claude.com/settings/billing
Since I use a Claude Max subscription, I shouldn't have been running out of pay-as-you-go balance.
I had no idea why this was happening, so I investigated — and found that the credentials set up with ant auth login during the workshop were being used for Claude Code authentication.
In this article, I'll summarize what actually happened and how Claude Code's authentication precedence works, while verifying against the official documentation and my local environment.
What Happened
When I ran the /status command in Claude Code, the Profile line showed credentials-file · user_oauth · profile default, meaning a different authentication method called user_oauth was being used, even though I should have been logged in via OAuth (/login) with my Claude Max account.

The Workshop Profile Had Been Left Behind
ant is a CLI for operating the Claude Platform, and it saves credentials to ~/.config/anthropic/. The file configs/default.json is the settings file for the profile created by ant auth login, and its contents were as follows.
{
"version": "1.0",
"authentication": {
"type": "user_oauth",
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
"organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"workspace_id": "wrkspc_xxxxxxxxxxxxxxxxxxxxxxxx"
}
The organization_id and workspace_id belonged to the organization and workspace created for the workshop.
The same organization was also shown when running ant auth status.
Logged in to <organization name> as <email address>
Workspace
(active) * Workspace wrkspc_xxxxxxxxxxxxxxxxxxxxxxxx (0731 Claude Managed Agents Workshop)
I had no memory of re-running ant auth login after the day of the workshop. Yet the last modified timestamp on credentials/default.json showed the morning of 8/21.
This means Claude Code had been silently using this profile's authentication in the background and continuously refreshing the access token.
Checking the Official Documentation
The Claude Code authentication documentation (Authentication precedence) contained an explanation of this behavior.
The
user_oauthrule keeps a leftoverant auth loginprofile from moving your requests off the account you signed in to with/login.
The user_oauth profile created by ant auth login is designed not to take precedence while the /login credentials are valid. Conversely, the moment the /login credentials become invalid for any reason, Claude Code falls back to the profile left behind by ant auth login.
Reproducing It Locally
I reproduced this behavior in my local environment. Launching Claude Code with claude --debug leaves authentication-related decisions in the debug log.
First, I launched it in a state where I was normally logged in with my Max account and checked the debug log.
[WARN] An Anthropic profile (~/.config/anthropic) is configured,
but a claude.ai login exists — using the claude.ai login.
Set ANTHROPIC_PROFILE=<name> to use the profile instead.
This tells us that Claude Code recognized the existence of the profile remaining in ~/.config/anthropic, but prioritized the /login credentials (the claude.ai login).
The note at the end — "Set ANTHROPIC_PROFILE=<name> to use the profile instead" — indicates that you can force Claude Code to use that profile by specifying it via the ANTHROPIC_PROFILE environment variable.
Next, I deleted the Claude Code credentials with /logout, then launched again with claude --debug.
[INFO] Using Anthropic profile auth (profile-implicit);
a claude.ai login (/login) would take precedence over it
This time, the display changed to show the user_oauth profile being used.
The log itself explicitly states "if a /login exists, it takes precedence," indicating that this profile is only being used now because /login is invalid.
The "sudden Credit balance too low" that occurred at the beginning was most likely caused by requests being sent in this state and the workspace balance running out.
How to Fix It
The official documentation's Anthropic profiles and federation credentials section also describes how to prevent the Anthropic profile from being selected.
Active profile: run
ant auth logoutfor auser_oauthprofile, or delete the profile's file fromconfigs/in your configuration directory for either auth mode
Either one is sufficient. I ran both.
ant auth logout
# ✓ Logged out of profile "default".
rm ~/.config/anthropic/configs/default.json
After running these, executing ant auth status showed the Credentials line as "not configured," and the workshop organization and workspace information no longer appeared.
Credentials
(profile "default" not configured — run `ant auth login` to set it up)
On the Claude Code side, I logged back in with /login using my Max account and confirmed that the Profile line in /status was pointing to the subscription account. Done.
Summary
The credentials from ant auth login are designed not to take precedence while the /login credentials are valid, but when the /login side becomes invalid, Claude Code automatically switches to the ant auth login credentials.
If you normally use Claude Code with a subscription and have used ant auth login once for a workshop or hands-on session, you'll be safe if you clean up the profile afterward with ant auth logout.
