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

Framing AI Conversations Instead of Writing Perfect Prompts
A developer shares seven practical techniques for improving Claude AI responses by framing conversations with context, roles, consequences, and judgment requests rather than focusing on perfect prompt wording.

OpenClaw Crash Loop Debugging: A 5-Point Checklist
A Reddit post from r/openclaw provides a five-step checklist for quickly diagnosing crash loops in OpenClaw agents or gateways, focusing on failure shape, host pressure, provider latency, config diffs, and alert setup.

20 Claude Code Commands Every Developer Should Know
A Reddit post lists 20 Claude Code commands for stopping tasks, managing context, branching, remote control, and productivity shortcuts like /compact, /branch, and /simplify.

How a Non-Coder Built a Reusable Claude Workflow for Founder Content Marketing
A former magazine editor with zero coding background shares how they accidentally built a repeatable Claude workflow for solo founder content marketing: dump raw thoughts, then restructure with Claude into platform-specific formats.