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.
Here's the scenario that will become common starting next week:
HTTP 402 Payment RequiredThe answer depends entirely on whether the 402 response contains machine-readable payment instructions.
There are actually two distinct 402 scenarios for agent-facing APIs:
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"
}
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"
}
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.
| Header | Meaning | Example |
|---|---|---|
x-402-action | What the agent should do | register or pay |
x-402-amount | Price per call in cents | 5 (5¢) or 0 (free/registration) |
x-402-chain | Blockchain for payment | base |
x-402-token | Payment token | USDC |
x-402-recipient | Wallet address to pay | 0xf16F... |
x-402-register | Registration endpoint | POST /api/v1/register-simple {"name":"..."} |
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:
x-402-amount: 5 → "5 cents".agent-budget → "max_per_call: $1.00 → 5¢ is well within limit"x-402-chain: base + x-402-recipient: 0xf16F... → initiates paymentNo human in the loop. No permission prompt. No context switch. The agent pays $0.05 for a gas lookup and keeps working.
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
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'
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