Skip to content

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

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

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 loop, run_agent.py, prompt builder provider/anthropic Anthropic native Messages API area/auth Authentication, OAuth, credential pools labels May 7, 2026
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 loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists provider/anthropic Anthropic native Messages API type/bug Something isn't working

Projects

None yet

2 participants