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

OpenClaw Dashboard Disconnecting After 2026.5.27 Update? Fix: Remove Stuck Update Launchd Job
After the 2026.5.27 update, a stuck update launchd job causes dashboard WebSocket disconnects and Telegram failures. Removing the job restores stability.

Routing Agent Subtasks to Cheaper Models Dropped Cost from $18 to $4 on Same Refactor
A developer cut agent run costs from $18 to $4 by routing routine subtasks (lint, rename, config edits) to cheap models like DeepSeek V4 Pro and Tencent Hunyuan Hy3, reserving Opus 4.7 for complex reasoning.

35 Days of Claude Code: Why 3 Parallel Agents Is the Real Ceiling
Analysis of 1,800+ Claude Code turns shows the bottleneck isn't context—it's human join capacity. A simple formula N ≈ 1 / (fraction of time waiting on you) explains the wall at 3 agents.

How to Run OpenClaw Without Breaking the Bank
Reddit user digitalknk shared a practical guide on running OpenClaw efficiently. A battle-tested setup focused on stability and cost control.