Add multiple Google accounts to increase your combined quota. The plugin automatically rotates between accounts when one is rate-limited.
opencode auth login # Run again to add more accounts- Sticky account selection — Sticks to the same account until rate-limited (preserves Anthropic's prompt cache)
- Per-model-family limits — Rate limits tracked separately for Claude and Gemini models
- Dual quota pools for Gemini — Automatic fallback between Antigravity quota and Gemini CLI quota before switching accounts
- Smart retry threshold — Short rate limits (≤5s) are retried on same account
- Exponential backoff — Increasing delays for consecutive rate limits
For Gemini models, the plugin accesses two independent quota pools per account:
| Quota Pool | When Used |
|---|---|
| Antigravity | Primary (tried first) |
| Gemini CLI | Fallback when Antigravity is rate-limited |
This effectively doubles your Gemini quota per account.
To enable automatic fallback between pools, set in antigravity.json:
{
"quota_fallback": true
}When running opencode auth login with existing accounts:
2 account(s) saved:
1. user1@gmail.com
2. user2@gmail.com
(a)dd new account(s) or (f)resh start? [a/f]:
Choose a to add more accounts while keeping existing ones.
Accounts are stored in ~/.config/opencode/antigravity-accounts.json:
{
"version": 3,
"accounts": [
{
"email": "user1@gmail.com",
"refreshToken": "1//0abc...",
"projectId": "my-gcp-project"
},
{
"email": "user2@gmail.com",
"refreshToken": "1//0xyz..."
}
],
"activeIndex": 0,
"activeIndexByFamily": {
"claude": 0,
"gemini": 0
}
}
⚠️ Security: This file contains OAuth refresh tokens. Treat it like a password file.
| Field | Description |
|---|---|
email |
Google account email |
refreshToken |
OAuth refresh token (auto-managed) |
projectId |
Optional. Required for Gemini CLI models. See Troubleshooting. |
activeIndex |
Currently active account index |
activeIndexByFamily |
Per-model-family active account (claude/gemini tracked separately) |
If Google revokes a token (e.g., password change, security event), you'll see invalid_grant errors. The plugin automatically removes invalid accounts.
To manually reset:
rm ~/.config/opencode/antigravity-accounts.json
opencode auth loginWhen using oh-my-opencode with parallel subagents, multiple processes may select the same account, causing rate limit errors.
Solution: Enable PID-based offset in antigravity.json:
{
"pid_offset_enabled": true
}This distributes sessions across accounts based on process ID.
Alternatively, add more accounts via opencode auth login.
Configure in antigravity.json:
{
"account_selection_strategy": "hybrid"
}| Strategy | Behavior | Best For |
|---|---|---|
sticky |
Same account until rate-limited | Prompt cache preservation |
round-robin |
Rotate to next account on every request | Maximum throughput |
hybrid |
Deterministic selection based on health score + token bucket + LRU | Best overall distribution |
See Configuration for more details.