Overview
When Claude Code users with Pro or Max subscriptions reach their usage limits, they should have the option to seamlessly fallback to using the Claude API with their own API key to continue their work session.
Current Behavior
- Users with Pro/Max subscriptions can use Claude Code until they hit their usage limits
- Once limits are reached, users must wait for the limit reset period or upgrade their subscription
- No option to continue using Claude Code with alternative authentication methods
Desired Behavior
- When usage limits are reached, Claude Code should detect the limit and offer a fallback option
- Users should be prompted to configure their Claude API key to continue the session
- The transition should be seamless, maintaining context and conversation history
- Clear indication of which authentication method is currently being used
Use Case
-
Developer in active coding session: A developer is deep in debugging or implementing a feature when they hit their Pro subscription limit. Rather than stopping work, they can seamlessly switch to API usage.
-
Critical deadlines: When working on time-sensitive projects, users can maintain productivity without interruption by switching to API billing.
Proposed Implementation
Configuration
Allow users to pre-configure API fallback in their Claude Code settings:
{
"fallback": {
"enabled": true,
"api_key": "sk-ant-api03-...",
"auto_switch": false,
"prompt_before_switch": true
}
}
Runtime Behavior
When limits are reached:
⚠️ Usage limit reached for your Pro subscription.
Options:
1. Wait for limit reset (resets in 2 hours)
2. Switch to Claude API (charges will apply to your API account)
3. Exit Claude Code
Choice [1/2/3]: 2
🔄 Switching to Claude API...
✅ Connected using Claude API. Current usage will be billed to your API account.
Status Indicator
Show current authentication method in the CLI:
# Pro subscription active
claude-code [Pro] >
# API fallback active
claude-code [API] >
Benefits
- Uninterrupted workflow: Users can continue productive sessions without forced breaks
- Flexibility: Choice between subscription limits and pay-per-use API billing
- Better user experience: Reduces friction when hitting usage limits
- Revenue opportunity: May encourage API adoption among subscription users
Overview
When Claude Code users with Pro or Max subscriptions reach their usage limits, they should have the option to seamlessly fallback to using the Claude API with their own API key to continue their work session.
Current Behavior
Desired Behavior
Use Case
Developer in active coding session: A developer is deep in debugging or implementing a feature when they hit their Pro subscription limit. Rather than stopping work, they can seamlessly switch to API usage.
Critical deadlines: When working on time-sensitive projects, users can maintain productivity without interruption by switching to API billing.
Proposed Implementation
Configuration
Allow users to pre-configure API fallback in their Claude Code settings:
{ "fallback": { "enabled": true, "api_key": "sk-ant-api03-...", "auto_switch": false, "prompt_before_switch": true } }Runtime Behavior
When limits are reached:
Status Indicator
Show current authentication method in the CLI:
Benefits