Skip to content

fix(anthropic): classify OAuth tool-use overage failures - #21019

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/anthropic-oauth-tools-overage-15080
Closed

fix(anthropic): classify OAuth tool-use overage failures#21019
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/anthropic-oauth-tools-overage-15080

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • add a distinct classifier reason for native Anthropic OAuth requests that fail only when tools are present with the misleading "out of extra usage" 400
  • pass OAuth/tool-presence context from the Anthropic run-loop into the classifier
  • surface actionable guidance and immediate fallback behavior instead of treating this as generic auth/billing noise

Issue / overlap

Fixes #15080.

This is intentionally narrower than the larger Claude CLI bridge discussed in the issue. It also does not duplicate #10576, which handles prompt-text-triggered OAuth failures, or #19260, which removes CLAUDE_CODE_OAUTH_TOKEN from Anthropic auth and would break Max-only OAuth users.

Verification

  • scripts/run_tests.sh tests/agent/test_error_classifier.py
  • python -m py_compile agent/error_classifier.py run_agent.py
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/anthropic Anthropic native Messages API area/auth Authentication, OAuth, credential pools labels May 7, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused OAuth-overage recovery work. Current main now provides the requested user-visible behavior, so this is redundant. This is an automated hermes-sweeper review.

  • ea9e8d6e8c80fbdd0b0b4864b833d2bfd3b429bb added Anthropic’s exact "out of extra usage" HTTP-400 wording to the billing classifier (agent/error_classifier.py:118); tests/agent/test_error_classifier.py:1357 verifies fallback and non-retryable recovery flags.
  • agent/conversation_loop.py:3707 attempts configured fallback before aborting non-retryable errors.
  • e00800fc89e761382326c3a5eef8f4cccfbbc205 added Anthropic-specific guidance at agent/conversation_loop.py:214, including claude.ai/settings/usage, billing-cycle reset, API-key, and provider-switch options.
  • The implementation shipped in v2026.7.1.

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

Labels

area/auth Authentication, OAuth, credential pools comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/anthropic Anthropic native Messages API sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

3 participants