env.dev

Update ·

Anthropic moves Claude Agent SDK and `claude -p` to a credit pool

From June 15, 2026, Claude Agent SDK and `claude -p` usage stops drawing from your subscription rate limits and starts draining a separate $20 (Pro) / $100 (Max 5x) / $200 (Max 20x) monthly credit. What you need to do before the cutover.

Source: Anthropic — Use the Claude Agent SDK with your Claude plan · Last updated:

Starting June 15, 2026, anything that runs through the Claude Agent SDK or the claude -p non-interactive command stops drawing from your subscription pool and starts draining a separate monthly credit: $20 on Pro, $100 on Max 5x, $200 on Max 20x. Interactive Claude Code in your terminal and IDE keeps using your normal subscription limits — only programmatic and headless usage moves to the new pool, and when the pool empties, requests pause unless you opt into extra usage at standard API rates. If your day-to-day workflow leans on claude -p, CI agents, or third-party harnesses authed through the SDK, you have about a month to decide whether the new credit covers you, whether to flip to an API key, or whether to run both.

TL;DR

  • June 15, 2026: Agent SDK and claude -p usage on Pro/Max/Team/Enterprise plans bills against a new monthly credit, not your interactive limits.
  • Monthly credit: $20 (Pro), $100 (Max 5x), $200 (Max 20x). Credits are per-account, do not pool across teammates, and do not carry over.
  • Out of credit: requests pause until cycle reset, or hit standard API rates if you enable extra-usage billing. Sonnet 4.6 is $3/$15 per MTok; Opus 4.7 is $5/$25.
  • Unchanged: interactive Claude Code (terminal and IDE), the web app, and Claude Cowork keep using your normal subscription limits.
  • Teams running shared automation: switch to an API key from the Claude Developer Platform. Credits explicitly cannot be pooled.

What Exactly Changes on June 15, 2026?

Anthropic split interactive Claude usage from programmatic Claude usage. Both used to share the same per-plan rate limits; from June 15 onward, programmatic usage runs out of a fixed monthly pool that refills on your billing cycle. The change is targeted at "compute arbitrage" — Max subscribers piping OAuth tokens into headless harnesses and consuming what would have cost 5–10x more on the API.

Usage typeBefore June 15After June 15
Interactive Claude Code (terminal, IDE plugins)Subscription rate limitsSubscription rate limits (unchanged)
Web app (claude.ai), Claude CoworkSubscription rate limitsSubscription rate limits (unchanged)
claude -p (non-interactive CLI mode)Subscription rate limitsNew Agent SDK credit; then paused or API rates
Claude Agent SDK (Python / TypeScript)Subscription rate limitsNew Agent SDK credit; then paused or API rates
Claude Code GitHub Actions integrationSubscription rate limitsNew Agent SDK credit; then paused or API rates
Third-party tools authed via SDKSubscription rate limits (now mostly blocked)New Agent SDK credit (Anthropic-approved partners only)
Claude Developer Platform API keyPay-as-you-goPay-as-you-go (no credit)

The interactive side of Claude Code is, on purpose, untouched. If you only use Claude through the terminal and your IDE, you will not see any difference on June 15. Everything below applies to people who run Claude programmatically — CI pipelines, batch jobs, scheduled tasks, custom agents, and tools that authenticate through the SDK.

Which Plans Get Credits, and How Much?

Five plans qualify. The credit refreshes each billing cycle, does not carry over, and is tied to an individual account — Team and Enterprise plans give each seat its own credit pool rather than a shared bucket.

PlanMonthly subscriptionAgent SDK creditEffective ratio
Pro$20$201.0x subscription value
Max 5x$100$1001.0x subscription value
Max 20x$200$2001.0x subscription value
Team (per seat)$30+/seat$20 per seatComparable to Pro per seat
Enterprise (per seat)NegotiatedPer-account, contact salesCustom
Developer Platform (API key)None$0 — pay-as-you-goNo credit; full API rates

The credit lands in your account on a one-time opt-in. Eligible users get an email from Anthropic before June 15 with a claim link. If you do not opt in, your Agent SDK and claude -p requests will start returning rate-limit errors after the cutover — the old subscription pool stops covering them either way.

What Counts Against the New Credit?

Anything that hits Anthropic's API on behalf of your subscription account, without a human typing at the REPL, draws from the new pool. That includes a few cases that surprise people on first read:

  • claude -p "…" and any shell pipeline that pipes input into Claude Code. This is the headline change — most CI and cron scripts use exactly this entry point.
  • Calls from the Claude Agent SDK @anthropic-ai/claude-agent-sdk (TypeScript) and claude-agent-sdk (Python) — whether you launch them from a script, a worker, or a custom CLI.
  • The Claude Code GitHub Actions integration. PR review bots, auto-fix workflows, and any other action that authenticates with your subscription credentials runs on the new credit.
  • Approved third-party harnesses authed via the SDK. Anthropic requires partner approval before a third-party tool can offer subscription-based login at all, so most OpenClaw-style passthroughs already stopped working in April 2026 — the survivors live on the new credit.
  • Subagents and scheduled tasks launched from headless sessions. They inherit their parent's billing context, so a long-running Agent SDK loop with five subagents pulls tokens from one credit pool.

What Does Not Change?

Interactive workflows stay exactly where they were. Anthropic deliberately drew the line between "a human is at the keyboard" and "a script is running unattended."

  • Claude Code in the terminal — REPL sessions, slash commands, interactive plan mode, and IDE plugins (VS Code, JetBrains) keep drawing from your subscription rate limits.
  • claude.ai web and desktop apps — chat, projects, Artifacts, file uploads, and Computer Use stay on subscription limits.
  • Claude Cowork — same pool as the web app.
  • The Developer Platform API — keys created in console.anthropic.com / platform.claude.com billed pay-as-you-go are not touched by the change.

One subtle consequence: an interactive Claude Code session that spawns a headless subagent through the SDK starts mixing pools. The interactive turns bill against your subscription; the SDK turns bill against the credit. Track both if you care.

How Far Does $20 / $100 / $200 Actually Go?

The credit is denominated in dollars at standard API rates. To turn that into something useful, anchor on a Sonnet 4.6 turn — the workhorse model for most headless Claude Code work. A representative coding turn looks like 8k input tokens (CLAUDE.md, file context, prior turn) and 1.5k output tokens — call it $0.0465 per turn at base rates ($3/MTok in, $15/MTok out). Add prompt caching (a baseline harness optimisation) and 80% of those input tokens are cache reads at 10% of base — drops the per-turn cost to roughly $0.029.

WorkloadApprox. tokens / monthCost on Sonnet 4.6Fits in…
Solo dev, 50 small CI runs/month~5M in / ~1M out~$30 (~$19 cached)Max 5x
Daily PR review bot, 200 PRs/month~30M in / ~5M out~$165 (~$100 cached)Max 20x or API
One always-on overnight agent~80M in / ~12M out~$420 (~$245 cached)API key only
Lightweight personal scripts~1M in / ~200k out~$6 (~$4 cached)Pro credit covers it easily
Spec-driven multi-agent runs~150M in / ~25M out~$825 (~$500 cached)API key only

Opus 4.7 changes the math sharply — it costs 5x more input and 1.67x more output than Sonnet 4.6 ($5/$25 vs $3/$15 per MTok), and its updated tokenizer can use up to 35% more tokens for the same text. With 80% cache hits, a Max 20x credit on Opus 4.7 covers roughly 4,000 typical coding turns; on Sonnet 4.6 the same $200 covers around 6,900. Drop cache hits and the gap widens — Opus naive is closer to 2,500 turns.

Three multipliers compound in the other direction. Prompt caching cuts repeated context to 10% of base. The Batch API halves both input and output costs for asynchronous workloads. Routing trivial subtasks to Haiku 4.5 ($1/$5 per MTok) gets you another 3x on the cheap end. Stack all three and a Max 20x credit can absorb a workload that would cost $1,500–$2,000 at naive Opus 4.7 rates.

Should You Switch to an API Key?

The credit is right-sized for individual experimentation and ad-hoc automation. Once you cross into team-shared or production workloads, an API key is the better fit — credits cannot pool, and predictable pay-as-you-go billing is easier to budget around than a fixed pool that rolls over to nothing.

Use caseBest fitReasoning
Solo dev trying out the SDKSubscription creditPro $20 covers 400–800 Sonnet turns. Zero setup vs. an API key.
Personal automation (cron, scripts)Subscription creditPredictable monthly cap with no surprise bill.
Team CI / shared PR review botAPI keyCredits do not pool across seats. Pay-as-you-go scales with PR volume.
Production agent serviceAPI keyStable rate limits, audit log, and team billing.
Mixed: interactive + occasional headlessSubscription credit + extra-usageStay on subscription, opt into extra-usage billing for the rare overflow.
High-volume nightly batch jobsAPI key + Batch API50% off both input and output for async work — credits cannot use Batch discounts.
Third-party harness developerAPI key (and your users bring their own)Anthropic blocks unapproved subscription-auth, even on the new credit.

Hybrid is usually right. Keep your subscription for interactive Claude Code, claim the credit for personal automation, and put a Developer Platform key in ANTHROPIC_API_KEY for anything that runs in CI or production. The Agent SDK reads that env var transparently — the same script can target both backends by switching one variable.

Same SDK script, two billing backends
# Local: use your subscription credit (after one-time opt-in)
claude-agent-sdk run ./agent.py            # auth via Claude Code session

# CI: use a Developer Platform API key (pay-as-you-go)
ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
  claude-agent-sdk run ./agent.py          # bills to your org's API account

Store the API key in your CI provider's secret store, never in the repo — see the GitHub Actions secrets and env vars guide for the OIDC pattern.

What Should You Do Before June 15?

Five concrete steps, in order. None of them are reversible enough to be scary, but the audit step usually surfaces something — most teams under-count how many places claude -p has crept into.

  1. Watch for the opt-in email from Anthropic. One-click claim; you have to do it once per eligible account. Skip this and you lose the credit on June 15 even if you pay for the plan.
  2. Inventory your headless usage. Grep for claude -p, @anthropic-ai/claude-agent-sdk, claude-agent-sdk, and claude-code-action across your repos. Note which run on your subscription account vs. an API key.
  3. Estimate monthly token spend. The Claude Code /cost command shows per-session input/output tokens; multiply by your typical session count. Compare to the $20/$100/$200 ceiling.
  4. Decide on extra-usage billing. The toggle controls what happens after credits empty: pause requests (default, predictable) or auto-bill at standard API rates (uninterrupted, harder to cap). Pick deliberately.
  5. Move team-shared workloads to API keys. Create one Developer Platform key per service, store it in your CI's secret manager, and update CI workflows to set ANTHROPIC_API_KEY before invoking the SDK or claude -p.

If any of your automation involves talking to external systems through MCP servers, the cutover is also a good time to audit which servers your agents have access to — the SDK gives subagents their own permission context, and credit discipline pairs naturally with tool discipline.

When Should You Not Use the Subscription Credit?

  • Shared team automation — credits are per-account and explicitly cannot be pooled. Five engineers on Max 20x is $1,000 of plan spend for $1,000 of unpooled credit; the same $1,000 on an API key buys roughly the same Sonnet tokens but with audit logs, team billing, and Batch API discounts that credits do not get.
  • Anything where a paused request would page someone — credits run out, requests stop. An API key fails closed on rate limits, not on a $20 ceiling.
  • Building a product that authenticates users through Claude — Anthropic does not allow third-party developers to offer claude.ai login or rate limits to their own customers without prior approval. Your users need their own keys.
  • Sustained nightly batch jobs — the Batch API gives 50% off for 24-hour async workloads. That discount applies only to Developer Platform usage, not to the credit.
  • Workflows that would be cheaper locally — for repetitive autocomplete, code review on small files, and other high-volume low-stakes work, a 24 GB GPU running Qwen2.5-Coder 32B locally is free at the margin once the hardware is paid for.

What About the Harness?

The Agent SDK is the harness Anthropic exposes for headless work — same tool loop, hooks, subagents, skills, and MCP support as interactive Claude Code, programmable in Python and TypeScript. If you have been following Anthropic's own writing on harness engineering, the credit change does not invalidate any of it. What it does is move the cost ledger from "hidden inside my $200 Max plan" to "a number you have to plan against."

Install the Agent SDK
# Python
pip install claude-agent-sdk

# TypeScript / Node — bundles the Claude Code binary as an optional dep
npm install @anthropic-ai/claude-agent-sdk

Teams already running a Level 3+ spec-driven agentic factory almost certainly outgrew the subscription credit on day one — the workloads in our cost table sit between $30 and $800/month before optimisation. That is what API keys are for. The credit's real audience is the long tail of individual developers who want to leave a script running overnight without thinking about per-token cost — and that audience now has a clean billing line for it.

Frequently Asked Questions

Will my interactive Claude Code sessions still work the same after June 15?

Yes. Interactive Claude Code in your terminal, IDE plugins, the claude.ai web app, and Claude Cowork all keep using your existing subscription rate limits. Only programmatic usage (Agent SDK, `claude -p`, GitHub Actions integration, approved third-party harnesses) moves to the new monthly credit.

How much is the Claude Agent SDK credit on each plan?

Pro: $20/month. Max 5x: $100/month. Max 20x: $200/month. Team and Enterprise: per-seat credits comparable to Pro, with details negotiated for Enterprise. Credits are individual — they do not pool across teammates and do not carry over.

What happens when my Agent SDK credit runs out?

By default, additional Agent SDK and `claude -p` requests pause until your billing cycle resets. If you opt into extra-usage billing, additional usage continues at standard Claude API rates ($3/$15 per MTok for Sonnet 4.6, $5/$25 for Opus 4.7) charged to your account on top of your subscription.

Should I switch to an API key instead of using the credit?

Use an API key for team-shared automation, production services, third-party products, and any workload that would benefit from Batch API discounts or unpaused service when costs spike. Use the subscription credit for solo experimentation, personal scripts, and predictable monthly caps. Many developers run both: subscription for interactive work, API key for CI and production.

Does `claude -p` still work after June 15, 2026?

Yes, `claude -p` is not deprecated. It just bills against the new Agent SDK credit instead of your subscription pool. After the credit empties it pauses (or charges API rates if you enabled extra-usage), unlike before when it shared your interactive rate limits.

Can my team share a single Agent SDK credit?

No. Anthropic states explicitly that credits belong to individual accounts and cannot be shared or pooled across teammates. For shared team automation, create a Developer Platform API key and bill the team account directly — that gives you pay-as-you-go billing, team-level audit logs, and access to the 50%-off Batch API.

Do API key users get a credit too?

No. The credit applies only to Pro, Max 5x, Max 20x, Team, and Enterprise subscription plans. Developer Platform API keys keep their existing pay-as-you-go billing with no credit and no change.

How do I claim the credit?

Anthropic emails eligible accounts before June 15 with a one-time opt-in link. Click it once per account. If you do not opt in, your subscription stops covering Agent SDK and `claude -p` requests on the cutover date even though you keep paying for the plan.

What about third-party tools that authed through my subscription?

Anthropic does not allow third-party developers to offer claude.ai login or rate limits to their own users without prior approval — most OpenClaw-style passthroughs already broke in April 2026. Approved partners continue to work and now draw from the new credit. Unapproved tools will not work either before or after June 15.

References

Compare the harness side of this trade-off — Claude Code, Cursor, OpenCode, and other agentic editors — on the env.dev AI hub, or jump straight to the Claude Code overview and the MCP servers Claude Code supports.

Was this helpful?

Frequently Asked Questions

Will my interactive Claude Code sessions still work the same after June 15?

Yes. Interactive Claude Code in your terminal, IDE plugins, the claude.ai web app, and Claude Cowork all keep using your existing subscription rate limits. Only programmatic usage (Agent SDK, `claude -p`, GitHub Actions integration, approved third-party harnesses) moves to the new monthly credit.

How much is the Claude Agent SDK credit on each plan?

Pro: $20/month. Max 5x: $100/month. Max 20x: $200/month. Team and Enterprise: per-seat credits comparable to Pro, with details negotiated for Enterprise. Credits are individual — they do not pool across teammates and do not carry over.

What happens when my Agent SDK credit runs out?

By default, additional Agent SDK and `claude -p` requests pause until your billing cycle resets. If you opt into extra-usage billing, additional usage continues at standard Claude API rates ($3/$15 per MTok for Sonnet 4.6, $5/$25 for Opus 4.7) charged to your account on top of your subscription.

Should I switch to an API key instead of using the credit?

Use an API key for team-shared automation, production services, third-party products, and any workload that benefits from Batch API discounts or unpaused service when costs spike. Use the subscription credit for solo experimentation, personal scripts, and predictable monthly caps. Many developers run both: subscription for interactive work, API key for CI and production.

Does `claude -p` still work after June 15, 2026?

Yes, `claude -p` is not deprecated. It just bills against the new Agent SDK credit instead of your subscription pool. After the credit empties it pauses (or charges API rates if you enabled extra-usage), unlike before when it shared your interactive rate limits.

Can my team share a single Agent SDK credit?

No. Anthropic states explicitly that credits belong to individual accounts and cannot be shared or pooled across teammates. For shared team automation, create a Developer Platform API key and bill the team account directly — that gives you pay-as-you-go billing, team-level audit logs, and access to the 50%-off Batch API.

Do API key users get a credit too?

No. The credit applies only to Pro, Max 5x, Max 20x, Team, and Enterprise subscription plans. Developer Platform API keys keep their existing pay-as-you-go billing with no credit and no change.

How do I claim the credit?

Anthropic emails eligible accounts before June 15 with a one-time opt-in link. Click it once per account. If you do not opt in, your subscription stops covering Agent SDK and `claude -p` requests on the cutover date even though you keep paying for the plan.