Running Claude Code at zero per-token cost: the Max-plan OAuth shim pattern A developer built an OAuth shim that allows Claude Code and other agentic systems to use the Anthropic Messages API through a Claude Max subscription, eliminating per-token costs. The shim, hosted at oauth.nucleusos.dev, proxies requests by substituting a Max-plan OAuth bearer token for an API key, requiring only two environment variable changes. The project, part of Eidetic Works, aims to reduce operational costs for multi-agent workloads. If you're running Claude Code or any agentic system that calls the Anthropic Messages API, you're probably paying per token. For light use, that's fine. For multi-agent systems with parallel workloads, it adds up fast. There's a different model: Claude Max subscription. Flat monthly cost, no per-token billing. The problem is that Max exposes a browser OAuth flow, not an API key. Your agent code expects ANTHROPIC API KEY . Max doesn't give you one. We built a shim that bridges the two. oauth.nucleusos.dev is an HTTP wrapper that exposes the Anthropic Messages API endpoint at /v1/messages . Internally, it routes each request through a Max-plan OAuth bearer token instead of an API key. The interface is 1:1 with the native Anthropic API. To use it, set two environment variables in your agent: ANTHROPIC BASE URL=https://oauth.nucleusos.dev ANTHROPIC API KEY=