Your x402 Endpoint Is One Header Away From Working for Free A developer building Argus, an adversarial testing tool for AI agents that move money, released a GitHub Action battery that probes x402 payment endpoints for validation failures such as serving resources before payment verification. In field reports, the team's own run against a live x402 resource on Vercel failed closed at the gate with zero cost charged, a ten-window idempotency battery against the mcp-tool-idempotency library passed 10/10 with one documented at-least-once window, and a pre-registered gate-hook battery against agentic-finance-graph 0.3.7 caught a race in which seven of eight parallel gate checks were allowed, roughly $1,400 of simultaneous spend against a $250-per-168h window. We built an adversarial battery for AI agents that move money — here's what it caught when we pointed it at real x402 payment flows. The x402 protocol is refreshingly simple: GET without payment → 402 with payment requirements → retry with a payment header → facilitator verifies and settles → 200. Simple enough that teams ship it in an afternoon. And simple enough that one missing header or one wrong comparison turns a paid resource into a free one — or a valid payment into a silent failure. We are building Argus, an adversarial testing tool for exactly this class of systems. This post is a field report, not a pitch. The happy path everyone tests — and the one nobody does A correct x402 implementation has two hard jobs: Refuse everything that isn't a valid payment. Wrong scheme, wrong asset, replayed nonce, expired quote, wrong payTo, unsigned body — every one of these must end in 402, not in a served resource. Accept valid payments exactly once. Retried signature, double-spend window, settle-after-verify failure semantics. The failure mode in category 1 is scary in a quiet way: your endpoint works, tests pass, demo looks great — and the resource is served for free because the payment validation happens after the handler. What the battery does Argus ships as a GitHub Action Argus battery on the Marketplace — you wire it into CI, it spawns the real engine locally, drives your SUT over 127.0.0.1, and issues verdicts as a check run: Family Argus plays Your SUT is Sessions BC bad client / buyer seller 9 S-BS bad seller buyer 6 Verdicts are registry-grade: PASS, FAIL, DOCUMENTED refusal probe with documented behavior — evidence, not failure , HARNESS ERROR. A resource served despite an invalid payment is always FAIL. No judgment calls. The engine itself is delivered as a sealed, Ed25519-signed bundle; the Action verifies the seal — manifest schema, key id, signature over the canonical manifest, tree sha256 of the tarball — before running anything. A broken seal means zero execution. Field report 1: our own run held at the gate We eat our own food. In a recent BC run against our own console the system under test was a live x402 resource on Vercel , the gate failed with a bare gate failed: fetch failed. That message is useless — Node's fetch hides the real cause inside error.cause. We fixed the diagnostics first ENOTFOUND: ... , ECONNREFUSED: ... , timeouts now land in evidence , and here's the part we're proud of: the gate failed closed: the battery stopped at the gate instead of running half-armed; nothing was charged — the run returned its quota, clean cost 0; the battery verdicts stayed honest. When money is involved, "fail closed and explain" is the feature. A harness that runs on a flaky network produces false FAILs — and false positives in payment testing teach people to ignore results. Field report 2: an external engagement that shipped a fix Not x402 this time, but the same money-lifecycle class: we ran a ten-window idempotency battery against mcp-tool-idempotency — a library that gives exactly-once semantics to MCP tool calls, i.e. to "AI agent did something expensive" moments. Ten windows probed: charge replay, retry-after-commit, in-flight takeover, cross-instance races, TTL boundaries. Result: 10/10 PASS on the release, with one documented at-least-once window coordinated with the maintainer before publication — and the upstream release v0.2.0 now covers every window on both backends. The full engagement — before-state reproduction, disclosure, post-release verification — is sealed in our public registry. Field report 3: a race in a live payment gate, closed in one day On 24 Nov we pointed a pre-registered gate-hook battery at agentic-finance-graph 0.3.7 — an agent payment stack that enforces a $250-per-168h spending window. Six of the seven frozen expectations matched. The seventh caught a race: eight parallel gate checks, seven were allowed — roughly $1,400 of simultaneous pending spend against a $250 cap. No settlement ever happened the race sits in the pending-check path , but one burst is all it would take. We froze the transcripts and posted the finding. The vendor's reply, verbatim: "The race is real on our side, and it is ours to fix." They wrote eight tests before touching the code, then deployed read-evaluate-insert under one advisory lock per agent and reference — live at 09:40 UTC the same day. A re-check against the patched gate: 1 allow, 7 blocks, exactly as the spec demands. That is the whole loop working end to end: pre-registered expectations → adversarial run → sealed evidence → vendor fix → public re-check. Every stage is verifiable in the registry; none of it requires trusting us. The proof layer: why "trust us" isn't enough Every claim above is pinned in a hash-chained attestation registry with Ed25519 signatures. Records pin evidence by SHA-256; a CI verifier re-checks every pinned byte on each push and fails the build on any drift. We learned this one the hard way: a lint commit once reformatted a pinned test file, and CI turned red within minutes. That's the system working as intended. You don't have to trust us. Verify in one command: bash git clone https://github.com/igor-vii/Argus-Agent-Test-Lab https://github.com/igor-vii/Argus-Agent-Test-Lab cd Argus-Agent-Test-Lab && node tools/registry/verify-registry.mjs The track record so far This is not one lucky find. The lab currently holds 32 signed records 23 seals, 5 findings, 4 corrections against ~20 external subjects — from protocol SDKs Cloudflare agents, Circle batching, Coinbase CDP to live community gateways. Four fixes have shipped by three vendors in response to our runs, and two independent third parties have re-verified the registry chain with the verifier above. Every hostile battery ran at $0.00 — free endpoints, no keys, no settlements. Full table with links to every record and verbatim vendor quotes: TRACK RECORD.md. Try it on your x402 endpoint Install Argus battery into your workflow. Drop an argus.sut.json contract into your repo root. Run CI — verdicts land as a check run with per-session annotations and a JSONL evidence artifact. The first paid run shows the price and balance; no silent charges. Zero balance returns 402 — the protocol's own error, used against the protocol's own customers, which we think is the right kind of recursion. Landing: https://argus-lab.tech?utm source=devto https://argus-lab.tech?utm source=devto · Proof repo: https://github.com/igor-vii/Argus-Agent-Test-Lab https://github.com/igor-vii/Argus-Agent-Test-Lab If you ship an x402 resource and want a battery scenario added to the lab registry, open an issue — scenario families grow with real-world flows, not synthetic ones.