Usage
Perform live quota probes for all accounts before scoring.
Output machine-readable JSON instead of human-friendly text.
Model to use for live quota probes (only with
--live).How It Works
- Load accounts - Read all enabled accounts from storage
- Score health - Calculate health score (0-100) per account
- Check rate limits - Factor in cooldown timers
- Probe quota (if
--live) - Fetch real-time usage - Evaluate risk - Low/medium/high risk per account
- Rank accounts - Sort by readiness and risk
- Recommend best - Output top choice with reasoning
Example Output
Default Mode (No Live Probe)
Live Mode
JSON Output
Availability States
Account is immediately available for use.
Account is usable but may have delays (low quota, cooldown ending soon).
Account is unavailable (rate-limited, disabled, or broken).
Risk Levels
Healthy account with high quota, no recent failures.
Account with moderate quota or minor issues (expired token but refresh works).
Account with low quota, recent failures, or impending issues (broken refresh token).
Scoring Factors
Health Score (0-100)
- 100 - Never failed, always refreshes successfully
- 80-99 - Occasional refresh failures (1-2)
- 50-79 - Multiple failures or warnings
- 0-49 - Consistent failures, near flagging threshold
Quota Impact (Live Probe Only)
- 5h window - Short-term burst capacity (weight: 60%)
- 7d window - Long-term sustained usage (weight: 40%)
Rate Limit Penalties
- Active rate limit (429): Availability = blocked
- Cooldown < 10 minutes: Availability = delayed
- Cooldown > 10 minutes: Availability = blocked
Disabled/Flagged
- Disabled accounts: Excluded from forecast
- Flagged accounts: Not in main pool (use
verify-flagged)
Examples
Quick forecast
Live forecast with quota
Forecast for specific model
Machine-readable forecast
Extract recommended index
Automation: Switch to best account
Performance
Default Mode
- Speed: ~100-200ms for 10 accounts
- Network: No API calls (uses cached data)
- Accuracy: Based on last health check
Live Mode
- Speed: ~2-3 seconds per account
- Network: 1 API request per account
- Accuracy: Real-time quota and rate limit status
--live: ~30 seconds total.
When to Use Each Mode
Default Mode
Good for:- Fast lookups during active sessions
- Pre-request account selection
- High-frequency automation
Live Mode
Good for:- Pre-session planning (morning check)
- After long idle periods
- When quota matters (batch jobs)
- Debugging rate limit issues
Exit Codes
Forecast completed (even if no ready accounts)
Forecast failed (no accounts, storage error)
Troubleshooting
No Ready Accounts
Live Probe Times Out
Increase timeout:Recommendation Doesn’t Match Usage
Clear session affinity:Stale Quota Data
Force refresh:Related Commands
codex auth check- Update health scorescodex auth switch- Switch to recommended accountcodex auth report- Detailed analysiscodex auth status- Current account state