Skip to content

Native Messages cannot preserve Claude request shape with an OAuth account pool #6532

Closed

Description

@clairernovotny

Client or integration

Claude Code

Area

Authentication and account pool

Summary

The opt-in native Messages lane refuses Anthropic OAuth pools and routes them through the legacy Messages-to-Responses-to-Messages bridge. This prevents using stored Claude accounts while retaining the original Messages history and cache breakpoint shape. A resumed large session showed repeated substantial cache writes; this observation does not establish the exact subscription-quota conversion or a single cache invalidation cause.

Expected native account selection to reuse existing session affinity, model routes, quota observations, pause/cooldown and bounded pre-output failure recovery without reconstructing the Messages body.

Reproduction

  1. Add two synthetic or authorized Anthropic OAuth accounts.
  2. Enable anthropicAccountPool and both managedMessagesNative switches.
  3. Preview or send anthropic/claude-opus-5-5 through /v1/messages.
  4. Eligibility returns oauth-account-pool and selects the legacy bridge.
  5. Disabling pooling alone is insufficient: a second usable account also enables failover quorum and declines the native route.

Version

OpenCodex 2.76.0

Operating system

macOS 27.2

Provider and model

Anthropic OAuth / claude-opus-5-5

Logs or error output

messages > responses-internal > ir > messages
reason: oauth-account-pool

Native pooling prototype is verified only with synthetic transports; live cache-hit and quota acceptance remain pending.

Screenshots and supporting files

Companion PR will include synthetic account and immutable-request fixtures, rate-limit failover and concurrent/manual-selection tests.

Redacted configuration

{"anthropicAccountPool":{"enabled":true,"strategy":"quota"},"protocols":{"rollout":{"managedMessagesNative":true,"managedMessagesNativeOAuth":true}}}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    account-pool
    on Oct 3, 2026
  2. lidge-jun commented on Oct 4, 2026

    @lidge-jun
    Owner

    The native pooling code correction is now on dev through #6552 and #6559, culminating in merge26dd8cf6579d28027b41acf2b67b2be9228590db.

    The implementation preserves native history/cache markers and tool naming, uses the existing account selector/refusal policy, and binds serving bearer/UUID/generation consistently with route, pause and manual-selection checks. Both exact integration candidates passed independent code/security/interdiff reviews and hosted CI before landing.

    Keeping this issue open for the explicitly pending live multi-account/resumed-session cache-hit and quota acceptance. Source-fork measurements and offline request/stream regressions do not establish that integrated live result. No actual provider account traffic or installed runtime was changed during this integration. These changes are on dev, not in2.77.0.

  3. lidge-jun commented on Oct 8, 2026

    @lidge-jun
    Owner

    Code status check on current dev (a12bb1f): the eligibility veto described here is gone.

    This issue stays open for the live acceptance noted earlier. That needs the running build SHA, effective native flags and preference, and cache-read / cache-creation usage for resumed turns, first under stable account affinity and then across an intentional account switch.

  4. lidge-jun commented on Oct 10, 2026

    @lidge-jun
    Owner

    Status check against dev (2026-10-10): the native Messages + OAuth account-pool request-shape fixes have landed. #6552 (0455845834), #6559 (26dd8cf657) and #6562 (33125e62d2) are all ancestors of dev.

    This stays open for live acceptance: we still need to confirm prompt-cache and quota behavior with a real Claude OAuth pool. If the current build still breaks the request shape for you, please attach the request headers and route, with secrets redacted.

  5. lidge-jun commented on Oct 19, 2026

    @lidge-jun
    Owner

    Closing as fixed by #6552, #6559 and #6562, which preserve the native Claude request shape across pooled OAuth dispatch. If you still see this on a current build, please reopen with the version and a request log. Thanks for the report.

  6. github-actions commented on Oct 19, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

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-poolbug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions