Anthropic's undocumented OAuth rate limit pool requires Claude Code system prompt

A developer building an LLM proxy discovered that Anthropic's rate limit handling for OAuth tokens depends on system prompt content, not headers or token type.
The problem
The developer had a working setup with:
- Anthropic SDK with authToken
- Beta headers (claude-code-20250219, oauth-2025-04-20)
- user-agent: claude-cli/2.1.75
- x-app: cli
Haiku worked fine, but Sonnet returned persistent 429 rate limit errors with no retry-after header, no rate limit headers, just "message": "Error". Meanwhile, an AI agent (running OpenClaw) on the same server with the same OAuth token had no issues with Sonnet 4.6.
The solution
After examining OpenClaw's Anthropic provider source (@mariozechner/pi-ai), the developer found this code:
// For OAuth tokens, we MUST include Claude Code identity
if (isOAuthToken) {
params.system = [{
type: "text",
text: "You are Claude Code, Anthropic's official CLI for Claude.",
}];
}
Adding this one line to the proxy fixed the Sonnet rate limit errors immediately.
How it works
The API routes requests to the Claude Code rate limit pool (which is separate and higher than the regular API pool) based on whether your system prompt identifies as Claude Code. This behavior isn't documented in the SDK docs or API docs.
Practical fix
If you're using Anthropic OAuth tokens and getting mysterious 429s, add "You are Claude Code, Anthropic's official CLI for Claude." to your system prompt.
📖 Read the full source: r/ClaudeAI
👀 See Also

Workaround for Control UI assets error after OpenClaw 2026.3.22 upgrade
A user posted a solution for the 'Control UI assets not found' error that occurs after upgrading to OpenClaw 2026.3.22, involving copying the control-ui folder from a beta installation to the stable release.

4 Files That Made Claude Code Write Safe Prod-Database Code
A developer shares four files—CLAUDE.md, MEMORY.md, framework.md, decisions/log.md—plus a Python bridge with idempotency keys and write guards that let Claude Code safely write to a Convex prod database.

Claude Isn't Bad at Coding — Your Context Setup Is
After months of using Claude, one developer argues failures stem from how you structure context, not the model itself. Key improvements: separate instructions from logic, cut context noise, and use stable patterns.

Yes Flow/No Flow: A Simple Technique to Reduce Context Hallucination in AI Coding Sessions
A Reddit user shares the Yes Flow/No Flow technique for maintaining consistency in AI conversations by rewriting prompts instead of stacking corrections, which helps reduce context breakdown and hallucination during long coding sessions.