Repository navigation
Description
Client or integration
Codex CLI
Area
Authentication and account pool
Summary
A confirmed Cloud Code Assist account-level ToS ban is correctly classified by the shipped classifier but never pauses the account, because the whole auto-pause path is gated behind an opt-in flag that defaults to absent. The account keeps being selected and re-hit with the same permanent 403. The appeal_url Google returns inside the error is also dropped, so the operator never learns an appeal exists.
Observed
Real response from cloudcode-pa.googleapis.com (v1internal:generateContent):
{
"error": {
"code": 403,
"message": "This service has been disabled in this account for violation of Terms of Service. Please submit an appeal to continue using this product.",
"status": "PERMISSION_DENIED",
"details": [{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "TOS_VIOLATION",
"domain": "cloudcode-pa.googleapis.com",
"metadata": { "uiMessage": "true", "appeal_url": "https://forms.gle/..." }
}]
}
}This is exactly the envelope #7819 (closing #7803) added at src/oauth/account-auto-pause-policy.ts:28-31: HTTP 403 + numeric code: 403 + status: "PERMISSION_DENIED" + the whole ToS sentence. Running the shipped regex against the live message:
regex matches actual message: true
code===403: true | googleStatus: PERMISSION_DENIED
So classification works. The failure is downstream.
Why it never pauses
src/oauth/account-auto-pause.ts:44-46:
const threshold = autoPauseThreshold(config.providers[name]?.accountAutoPause);
if (!threshold) return; // <-- returns before any observer is installedand autoPauseThreshold (account-auto-pause-policy.ts:43-47) returns undefined unless policy?.enabled === true. The type documents this as opt-in:
/** Explicit opt-in. Omitted and false both leave account eligibility unchanged. */
enabled?: boolean;My provider had no accountAutoPause key at all (null), so no observer was ever registered and the ban was invisible to the pool.
Impact measured from usage.jsonl
Two Cloud Code Assist accounts, both genuinely banned:
| account | last 200 | first 403 | 403s after ban | window | successes after ban |
|---|---|---|---|---|---|
| A | 11-14 13:00:23 | 11-14 13:00:29 | 12 | 1.7 h | 0 |
| B | 11-13 22:55:46 | 11-14 14:44:48 | 9 | 2.8 h | 0 |
Account A's first 403 lands 6 seconds after its last 200, so there is no ambiguity window in which the verdict could be dismissed as transient. Zero successes across both accounts after the first 403, yet the pool kept issuing requests for hours.
Expected
- A verdict Google itself marks permanent (
TOS_VIOLATION/ "service has been disabled in this account") should pause that account on the first occurrence and should not require opt-in. TheconsecutiveFailuresstreak makes sense for ambiguous refusals, but a whole-message permanent ban is conclusive on first hit. At minimum this verdict should be exempt from the opt-in gate, or the gate should default to enabled for the CCA adapter. - The
appeal_urlinErrorInfo.metadatashould be surfaced, logged once per account and exposed via the management API / dashboard, so the operator can act instead of silently retrying a dead account.
The practical workaround today is noticing the 403s by hand and setting accountAutoPause: { enabled: true } on the provider, which is not discoverable from the error message.
Reproduction
- Have a
google-antigravityprovider inconfig.jsonusingauthMode: "oauth",googleMode: "cloud-code-assist", with two healthy OAuth accounts and noaccountAutoPausekey (the default for anyone who never opted in). - Let either account get suspended by Google. Generation then returns the 403
TOS_VIOLATIONenvelope quoted above;v1internal:loadCodeAssiststill returns 200, so the account is not detected as dead by any quota path. - Keep sending normal traffic through the proxy for a couple of hours.
- Observe: the banned account keeps being selected and re-hit with 403.
usage.jsonlaccumulates 403 rows with the sameaccountLogLabeland no successes in between, but nopausedAt/ pause reason is ever set on the account (there is noGET /api/oauth/accountsfield change), because no observer was registered in step 1.
To see the difference, add the opt-in and repeat:
"google-antigravity": {
"accountAutoPause": { "enabled": true, "consecutiveFailures": 2 }
}With the opt-in present the classifier (which already matches the message) starts counting and the account is paused after the threshold. Without it, the shipped ToS detection from #7819 is unreachable dead code for every default install.
Reproduces 100% of the time because the suspension is permanent and server-side; no local state affects it.
Version
2.100.2
Operating system
macOS 27.2 (arm64, MacBook Pro M5 Max)
Provider and model
google-antigravity / gemini-3.8-flash (googleMode: cloud-code-assist, authMode: oauth)
Logs or error output
Upstream response, verbatim (secrets removed):
HTTP/1.1 403 Forbidden
{
"error": {
"code": 403,
"message": "This service has been disabled in this account for violation of Terms of Service. Please submit an appeal to continue using this product.",
"status": "PERMISSION_DENIED",
"details": [{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "TOS_VIOLATION",
"domain": "cloudcode-pa.googleapis.com",
"metadata": {
"uiMessage": "true",
"appeal_url": "https://forms.gle/<redacted>",
"appeal_url_link_text": "Submit Appeal"
}
}]
}
}
Corresponding `usage.jsonl` rows (labels are the proxy's own `accountLogLabel`):
{"provider":"google-antigravity","status":403,"accountLogLabel":"<A>","timestamp":...}
{"provider":"google-antigravity","status":403,"accountLogLabel":"<A>","timestamp":...}
{"provider":"google-antigravity","status":403,"accountLogLabel":"<B>","timestamp":...}
75 total 403 rows for this provider in the log, 12 on account A and 9 on account B, all with `reason: TOS_VIOLATION`. No pause record was produced for either account.
Note that `v1internal:loadCodeAssist` still returns 200 for both accounts at the same time, and `https://www.googleapis.com/oauth2/v2/userinfo` returns 200 with `verified_email: true`, so nothing in the quota/health path notices the account is unusable for generation.Screenshots and supporting files
No response
Redacted configuration
"google-antigravity": {
"adapter": "google",
"authMode": "oauth",
"googleMode": "cloud-code-assist",
"oauthAccountFailover": { "enabled": true, "autoSwitchThreshold": 80 },
// "accountAutoPause": absent -> null; this is the bug trigger
}
`oauthAccountFailover` is enabled but does not help here: it switches on quota percentage, and a ToS-banned account still reports usable quota. Only `accountAutoPause` would catch it, and it is off by default.Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
twoimo commentedon Nov 14, 2026
Confirming the workaround on the same install (2.100.2, macOS): adding the opt-in makes it work correctly on the live path.
Applied via
ocx provider editso the running proxy picked it up (editingconfig.jsondirectly did not take effect —GET /api/configstill reportedaccountAutoPause: nulluntil the management path wrote it). Then two requests:ocx account list google-antigravity --json:{ "id": "63bd84…", "paused": true, "pauseDetails": { "reason": "account_permission_denied", "pausedAt": 1794646749258 } }, { "id": "f96c72…", "paused": true, "pauseDetails": { "reason": "account_permission_denied", "pausedAt": 1794646797258 } }So the classifier, the pause write, and the pool exclusion all work. The only gap is that this is opt-in and undiscoverable from the error. Two small follow-ups would close it:
TOS_VIOLATIONrefusal as conclusive on first hit regardless ofaccountAutoPause.enabled.ErrorInfo.metadata.appeal_urlin the operator-visible error so the 403 tells the user what to do (appeal), instead of only that it failed.A side note while testing: pointing
defaultProviderat a provider whose accounts are all paused yieldsOAuth account is pausedon every request rather than failing over to another configured provider. That is arguably correct, but it is easy to hit after this exact scenario because the default provider keeps its old value.dongbidi commentedon Nov 14, 2026
Additional reproduction: account suspension in native Antigravity and Codex Desktop
This adds evidence about the Google account suspension itself, alongside the OpenCodex auto-pause behavior described above. The affected Antigravity account had been working earlier; requests then began returning the account-level Terms of Service refusal.
Observed in this incident:
PERMISSION_DENIED, stating that the service was disabled in the account for a Terms of Service violation and asking the user to submit an appeal.google-antigravity / gemini-4-carbonfirst returned the same 403 refusal.accountAutoPause: { enabled: true, consecutiveFailures: 2 }configured, the subsequent attempt showed OpenCodex's local response,OAuth account is paused. Resume it in account settings and retry.This separates two effects: Google's account-level refusal is still present in the official Antigravity app, while OpenCodex's configured auto-pause then prevents further retries. The direct-app result does not establish whether OpenCodex contributed to Google's suspension; it shows that the restriction is not just a local proxy, provider-refresh, or Codex Desktop connection error.
Useful follow-up would be to surface the structured Google refusal and its appeal link clearly, make the account-level suspension distinct from quota exhaustion in the operator-facing error, and prevent repeated requests once this definitive refusal is received. No email address, OAuth credential, account identifier, or Google error ID is included here.
Ingwannu commentedon Nov 16, 2026
The current source confirms the behavior you isolated:
captureAccountAutoPauseAttemptreturns before installing an observer whenautoPauseThresholdis absent, and the config contract deliberately treats absent/false as opt-out. That is a policy/default gap rather than a failure of the exact 403 classifier. Your follow-up shows the configured streak path working; the native-app observations in #8760 do not establish why Google suspended the account.Making a permanent refusal override that opt-in changes account eligibility by default, so it needs an explicit owner decision, including how an explicit false differs from an omitted setting. A patch must retain the existing credential-generation, destination, policy-revision and pause-revision fences; a response for an old login must not pause a new one. Add structured TOS-refusal versus ordinary 403/quota/transient controls, and no automatic resume or silent account-policy change.
Appeal guidance should be a separate bounded, validated operator-visible projection. Treat upstream metadata as untrusted; do not blindly log or render an arbitrary appeal URL or its query data. #8820's unmerged acknowledgement does not implement first-hit pausing or reverse an upstream suspension. No account settings, eligibility or service were changed in this triage.
Ingwannu commentedon Nov 16, 2026
Follow-up: #8826 is now open as a Draft for the no-policy default described above. Its proposed threshold-one path is limited to the exact Cloud Code Assist account-ban envelope, while explicit policy values override the default. It still needs owner policy acceptance, current-head review and CI; this is not a shipped fix. Appeal URL presentation remains a separate outstanding part of this issue.
Surface validated Cloud Code Assist appeal links (#8752)
pr-assets: #8752 paused account appeal link screenshot
Surface validated Cloud Code Assist appeal links (#8752) (#8936)