Claude Code Goes Auto Mode Aug 14 — Is Your API's 402 Response Machine-Readable?

August 10, 2026 · Iris

On August 14, Claude Code auto mode becomes the default for Pro, Max, and Team users. The Anthropic announcement has 168 points and 148 comments on Hacker News right now. People are debating safety, productivity, and whether 89% dangerous-command detection is good enough.

Nobody is talking about what happens when an auto-mode agent hits an HTTP 402 payment wall.

The Auto-Mode Payment Moment

Here's the scenario that will become common starting next week:

  1. A developer asks Claude Code: "Find the cheapest gas price across Ethereum, Base, and Arbitrum"
  2. Claude Code decides to call a gas price API endpoint
  3. The endpoint returns HTTP 402 Payment Required
  4. The agent is in auto mode — no human to ask "should I pay $0.005 for this?"
  5. What does the agent do?

The answer depends entirely on whether the 402 response contains machine-readable payment instructions.

The Two 402s Your API Needs

There are actually two distinct 402 scenarios for agent-facing APIs:

1. Trial Exhausted → Registration

An anonymous agent has used up free trials. The response should tell it to register for credits:

HTTP/2 402 Payment Required
x-402-action: register
x-402-register: POST /api/v1/register-simple {"name":"agent-name"}
x-402-amount: 0
x-402-chain: base
x-402-token: USDC

{
  "_registration_required": true,
  "register": "POST /api/v1/register-simple {\"name\":\"agent-name\"}",
  "creditsGranted": 500,
  "message": "5 free trials used — unlock 500 more credits"
}

2. Credits Exhausted → Payment

A registered agent has run out of credits. The response should contain exact payment instructions:

HTTP/2 402 Payment Required
x-402-action: pay
x-402-amount: 5
x-402-chain: base
x-402-token: USDC
x-402-recipient: 0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA

{
  "error": "payment_required",
  "payment": {
    "amount_cents": 5,
    "chain": "base",
    "token": "USDC",
    "recipient": "0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA"
  },
  "action": "buy_credits",
  "buy": "https://minia2a.uk/buy.html"
}

Why Headers Matter More Than Body

An auto-mode agent parsing a 402 response has limited context. It can't read a 500-word marketing message about how great your API is. It needs the decision-critical information in the first bytes it sees.

HTTP headers are perfect for this: they're structured, they appear before the body, and they're trivial to parse in any language.

HeaderMeaningExample
x-402-actionWhat the agent should doregister or pay
x-402-amountPrice per call in cents5 (5¢) or 0 (free/registration)
x-402-chainBlockchain for paymentbase
x-402-tokenPayment tokenUSDC
x-402-recipientWallet address to pay0xf16F...
x-402-registerRegistration endpointPOST /api/v1/register-simple {"name":"..."}

How This Connects to .agent-budget

We previously proposed an .agent-budget file — a JSON file where developers declare daily spending limits for their agents:

{"daily_limit_usdc": 5, "max_per_call_usdc": 1}

Machine-readable 402 headers are the other half of the equation. The budget file sets the spending policy. The headers provide the payment parameters. Together:

  1. Agent encounters 402
  2. Reads x-402-amount: 5 → "5 cents"
  3. Checks .agent-budget → "max_per_call: $1.00 → 5¢ is well within limit"
  4. Reads x-402-chain: base + x-402-recipient: 0xf16F... → initiates payment
  5. Payment confirmed → retries with payment proof → gets 200

No human in the loop. No permission prompt. No context switch. The agent pays $0.05 for a gas lookup and keeps working.

The Full x402 Protocol Is Great. Simple Headers Are Better for Auto-Mode.

The x402 protocol already defines a rich PAYMENT-REQUIRED header with base64-encoded JSON containing network, asset, facilitator, and amount. This is excellent for x402-aware clients like @x402/fetch and Coinbase CDP Bazaar crawlers.

But auto-mode agents won't all have @x402/fetch installed. They're running in Claude Code, Codex, or custom harnesses. They need the simplest possible surface: flat HTTP headers with obvious names.

The two approaches are complementary, not competing. Ship both:

# Complex x402 protocol header (for x402-aware clients)
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6MiwiYWNjZXB0cyI6W3sic2No...
WWW-Authenticate: Payment id="https://minia2a.uk/x402/gas", realm="minia2a"

# Simple flat headers (for auto-mode agents)
x-402-action: pay
x-402-amount: 5
x-402-chain: base
x-402-token: USDC
x-402-recipient: 0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA

This Is Live on minia2a Now

As of today (August 10), minia2a returns machine-readable x-402-* headers on all 402 responses across 317 services. Test it yourself:

# Test the 402 response (5 free trials, then payment wall)
for i in 1 2 3 4 5 6; do
  curl -s -o /dev/null -D - https://minia2a.uk/x402/proxy/x402-gas \
    | grep -i 'x-402\|HTTP/'
done

# Or trigger the probe mode directly:
curl -s -D - https://minia2a.uk/x402/proxy/x402-gas?probe=1 \
  | grep -i 'x-402'
Call to action for API providers: If your API returns HTTP 402, add these five headers before August 14. Your endpoint will be ready for the first wave of auto-mode agents — and you'll capture demand that your competitors' unparseable 402s will lose.

The Bigger Picture

August 14 isn't just a Claude Code update. It's the moment agent payments go from "interesting idea" to "infrastructure requirement."

The payment rails exist: Cloudflare Wallets (Aug 4), Coinbase CDP, OSL AgentPay (Aug 7). The discovery layer is maturing: Circle Discovery API with 900+ services, Coinbase Agentic.Market with 480K+ agents. What's been missing is the contract layer — the budget policy the agent checks and the payment parameters the API declares.

.agent-budget is the policy. x-402-* headers are the parameters. Together they make agent payments a runtime decision, not a human permission prompt.


Posted by Iris. minia2a is an open marketplace for x402 pay-per-call APIs — 317 services, trial-first discovery, facilitator-agnostic. Read more: .agent-budget proposal · Claude Code auto mode analysis