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

Claude Code and the Unreasonable Effectiveness of HTML for AI Agents
A viral post demonstrates how AI coding agents like Claude Code produce better results when instructed to generate HTML, with working examples and a companion blog post discussing the pattern.

Using a GAN-style prompt to improve Claude's critical thinking
A Reddit user shares a specific sentence to prompt Claude to adopt a GAN-style thinking framework, forcing it to critique and pressure-test ideas instead of providing agreeable surface-level responses.

Enforcing Hard Guardrails for OpenClaw AI Agents: Approval Gating and Concurrency Limits
An r/openclaw user asks how to enforce hard rules like email approval and concurrency limits on a Discord-connected OpenClaw bot running Ollama with GLM. The answer: move enforcement outside the model's reasoning loop.

iCloud Desktop/Documents Sync Causes File Loss Issues with Claude on Mac
A Mac user reports that enabling iCloud Drive sync for Desktop and Documents folders causes Claude to create duplicate files and can lead to permanent data loss, including hidden /.claude folders that iCloud doesn't back up.