Skip to content

[Feature]: Recognize confirmed Google account-level refusal texts for account auto-pause #7803

Closed

Description

@vibewriter-hand

Area

Authentication and account pool

What are you trying to accomplish?

Pause a Google OAuth account after repeated confirmed account-level suspension or disablement refusals. Model-level permission errors must not pause the account.

What prevents this today?

In published 2.92.0, src/oauth/account-auto-pause-policy.ts:19 matches only a narrow whole-message pattern. Synthetic results of classifyPermanentAccountRefusal:

  • 403 PERMISSION_DENIED with Your account is suspended. returns account_permission_denied.
  • 403 PERMISSION_DENIED with This Google account has been suspended. returns nothing.
  • 401 UNAUTHENTICATED with Your account is suspended. returns nothing.
  • 403 PERMISSION_DENIED with Access to this model is denied. returns nothing (correct).

These messages are synthetic. We have not seen a live Google suspension or disablement response, so we do not know the real wording or status code.

What should OpenCodex do?

Accept documented Google account-level patterns once a real response is known, or allow a configured per-provider pattern policy. Keep the repeated-refusal threshold and generation fencing. Require positive account-level evidence; do not pause for model permissions, transient failures or ambiguous text. Define how an operator clears the pause.

Example usage or interface

Feed the classifier the synthetic responses above. A supported account-level refusal pauses only the affected account after the configured threshold. Access to this model is denied. never pauses it. Add tests for 401 and 403, account and model scope, false positives and stale credential generations.

Alternatives or workarounds

An operator pauses an affected account by hand after checking the refusal. Do not assume that every Google 403 means a suspension.

Additional context

Live Google response envelopes are unverified. This asks to extend the narrow detection once real envelopes are known; it does not claim that every Google 403 is missed.

Related: #7101 and #7153 (auto-pause after repeated permanent refusals), #6749 (Anthropic pool did not eject a revoked-token account), #5991 (Kiro failover on suspension refusals).

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. lidge-jun commented on Oct 27, 2026

    @lidge-jun
    Owner

    #7819, merged to dev as 98e6f0c, adds the confirmed Google envelope to the opt-in accountAutoPause classifier: HTTP 403, numeric code: 403, status: PERMISSION_DENIED, and exactly the Cloud Code Assist Terms of Service ban message Google has returned, alone or with its fixed contact or appeal sentence (google-gemini/gemini-cli #19501, #20813, #27199, #27388). It maps to account_permission_denied; the threshold, wire ownership and generation fences are unchanged, and resume clears it as for other reasons.

    Deliberately not added: CONSUMER_SUSPENDED (Google documents it for a suspended consumer project, not the sending identity), service-enablement and model-permission errors, 401 variants, and any wording without a real observed envelope. That matches the request here (confirmed texts only), so closing; a new real envelope can be added the same way with its source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions