· 6 min read ·

When Pay-Per-Token Beats the Claude Code Subscription and When It Doesn't

Source: hackernews

A developer posted this week about moving away from a $100/month Claude Max subscription in favor of Zed and OpenRouter. The HN thread got 335 points and 221 comments, a reasonable signal that a lot of developers are thinking through the same math. What the discussion actually reveals is less about cost optimization and more about a real architectural distinction in AI coding tools that flat-rate pricing had been quietly papering over.

The Policy Change That Forced the Issue

Two days before the braw.dev post went up, Anthropic sent an email to affected users announcing that third-party harnesses, specifically naming OpenClaw, would no longer be able to consume Claude subscription limits starting April 4. OpenClaw is an alternative frontend for Claude that had developed a following among users who wanted more control over their interactions without building their own tooling from scratch. For users who had built workflows around it as a way to get more mileage from their subscription, this change effectively devalued what they were paying for.

This context makes the braw.dev article legible. The move from $100/month to Zed and OpenRouter was not purely a cost optimization exercise; it was a response to having the terms of a subscription changed in a meaningful way mid-cycle.

What Claude Max Actually Is

Claude Max is marketed as “5x more usage” than Claude Pro, priced at $100/month. That framing obscures something important: the usage is still subscription-based and rate-limited. You are not buying unlimited model access; you are buying a larger monthly allocation before throttling kicks in. For developers running agentic loops with Claude Code, especially on large codebases, that allocation can deplete faster than expected.

Claude Code itself is the terminal-based agentic CLI from Anthropic, and it is not an editor plugin. It maintains a tool-use loop where it reads files, writes files, runs shell commands, runs tests, and iterates, all within a 200,000 token context window. The power lives in the agentic scaffolding: CLAUDE.md files for persistent context injection, hooks that enforce policy before and after tool use, non-interactive mode for scripting, and MCP integration for extending the tool set. When you pay for Claude Max, you are primarily paying for the right to run more of these agentic loops per month.

Zed and OpenRouter Do Something Different

Zed is a code editor written in Rust, open source, built from scratch rather than forked from VS Code. Its AI features are embedded at the editor level: inline completions, an assistant chat panel, and agent-mode editing within files. Unlike Cursor or Windsurf, Zed has first-class support for multiple AI providers, including OpenRouter.

OpenRouter is a unified API layer that aggregates hundreds of models from Anthropic, OpenAI, Google, Meta, Mistral, and others behind a single OpenAI-compatible endpoint. You add credits to your account and pay per token. There is no subscription fee from OpenRouter itself; they take a small markup, typically a few percent above the underlying provider’s rates. The configuration in Zed’s settings.json is straightforward:

{
  "language_model": {
    "provider": "openrouter",
    "model": "anthropic/claude-sonnet-4-5"
  }
}

This gives you Claude Sonnet at the same quality level Claude Code uses, billed per token through OpenRouter, with access to any other model in the OpenRouter catalog if you want to experiment.

The break-even math is real but context-dependent. If your typical usage translates to $30-40/month in API tokens, you are saving meaningfully versus $100/month flat. Claude Sonnet-class models run around $3-15 per million tokens depending on tier, which means you need to be consuming tens of millions of tokens per month before the subscription starts making economic sense. Most developers working at the scale of a single codebase are not in that range.

What You Lose in the Transition

The comparison between Claude Code and Zed is not a straight model-for-model swap. Zed’s AI integration is editor-level: it helps you as you work, within the context of files you have open. Claude Code’s agentic loop is autonomous: you give it a task, it executes across the entire repository, it runs your test suite, it fixes what it broke, and it reports back. These serve genuinely different use cases.

If you were using Claude Code primarily as a smarter autocomplete and coding assistant for individual files, Zed plus OpenRouter is a reasonable replacement. If you were using it for autonomous, multi-step tasks that span your entire codebase, it is not a drop-in substitute.

What specifically is missing in the Zed workflow:

  • No CLAUDE.md context injection: Claude Code reads your project-level instructions file automatically. Zed has no equivalent persistent context mechanism.
  • No hooks: Claude Code lets you run shell commands before and after tool use to enforce lint checks, test runs, or block destructive operations. Zed has no hook system.
  • No non-interactive scripting mode: Claude Code supports claude -p "prompt" for programmatic use in CI or build systems. Zed is an interactive editor.
  • No bash tool: Claude Code can run arbitrary shell commands as part of its loop. Editor-integrated AI cannot.

These are not minor gaps for developers who have built their workflows around them.

The Proxy Approach Preserves the Agentic Loop

There is a technical middle ground worth knowing about. Claude Code supports an environment variable, ANTHROPIC_BASE_URL, that redirects its API calls to any compatible endpoint. Combine that with LiteLLM running locally as a proxy, which translates Anthropic’s API format to the OpenAI format that OpenRouter and most other providers use, and you can run Claude Code’s full agentic engine against any model OpenRouter serves:

# Start LiteLLM proxy pointing to OpenRouter
litellm --model openrouter/anthropic/claude-sonnet-4-5 --port 4000

# In a separate terminal, point Claude Code at the proxy
export ANTHROPIC_BASE_URL=http://localhost:4000
export ANTHROPIC_API_KEY=any-nonempty-string
claude

This preserves CLAUDE.md context injection, hooks, non-interactive mode, and the full tool-use loop, while billing through OpenRouter on a pay-as-you-go basis. It is more setup than switching editors, but it is the fair comparison for developers who depend on the agentic capabilities rather than just the model quality.

One caveat: LiteLLM has had security issues. A critical code injection vulnerability in its proxy server was disclosed in early 2025, and the project’s attack surface is non-trivial given that it handles arbitrary model routing. Keep the proxy on localhost, do not expose it to your network, and keep it updated.

What the Subscription Model Was Obscuring

Flat-rate subscriptions bundle distinct things together in ways that benefit the seller. Claude Max bundles model quality, usage volume, and the agentic Claude Code scaffolding into a single line item. When you are paying $100/month without scrutinizing the bill, you do not need to think about which of those three you are consuming.

The Anthropic policy change around third-party harnesses forced exactly that examination. If the subscription no longer covers the third-party workflow you built around it, you have to decide whether the remaining value, Claude Code’s own agentic loop plus access to Claude Sonnet quality models, justifies the price at your usage level. For a lot of developers, that examination led them to Zed and OpenRouter, not because those tools are strictly better but because the math only works for a specific usage profile.

The braw.dev post is one data point among many in a broader repricing that is happening across AI coding tools. The question worth sitting with is not which tool costs less in the abstract, but what the actual workflow requires from the AI layer, and whether a flat rate or per-token billing maps more honestly to that usage pattern. For moderate, editor-integrated usage, Zed and OpenRouter make that math obvious. For heavy agentic use, the subscription or pay-as-you-go API access to Claude Code’s own endpoint remains the cleaner path.

Was this interesting?