X42 Protocol

Description

The X42 Protocol is an unshipped feature discovered in the Claude Code codebase that would enable autonomous USDC stablecoin payments through an Anthropic-hosted relay. It is designed to allow AI agents to purchase services, deploy infrastructure, and pay for resources during autonomous task execution without requiring human intervention at each payment step. The protocol remains unreleased and exists only as code artifacts in the leaked codebase.

AgenticPaymentRequest Type

The core data structure is the AgenticPaymentRequest type, which encapsulates all information needed for an autonomous payment:

Field Type Description
amount number Payment amount in USDC (USD-pegged stablecoin)
recipient string Recipient wallet address or service identifier
memo string Human-readable description of what the payment is for
budget_remaining number How much of the session's payment budget remains after this transaction

The budget_remaining field is critical for safety -- it enforces a session-level spending cap that the agent cannot exceed, providing a hard ceiling on autonomous expenditure.

Intended Use Cases

Based on the code artifacts, X42 was designed to support scenarios where an agent needs to procure resources autonomously:

Relay Architecture

Payments flow through an Anthropic-hosted relay rather than connecting directly to blockchain networks. This relay serves as an intermediary that:

  1. Validates the AgenticPaymentRequest against the session's budget.
  2. Verifies the recipient is on an approved merchant list.
  3. Executes the USDC transfer on-chain.
  4. Returns a payment confirmation to the agent.

The relay design avoids exposing wallet private keys to the agent and centralizes fraud detection and compliance checking at Anthropic's infrastructure.

Safety and Governance Implications

X42 represents one of the most consequential unreleased features in the codebase. Autonomous AI payments raise significant questions about liability, authorization, and fraud prevention. The permission-pipeline would need to integrate payment approval as a new permission category, and the yolo-classifier would need payment-specific classification rules to determine when human approval is required for a transaction.

Integration

X42 would integrate with queryengine-ts as a new tool type, with the hooks-system providing PrePayment and PostPayment lifecycle events. The three-layer-verification system would need a financial verification layer. Budget tracking would persist across session resumption via session-persistence.

Key claims

Relations

Sources

src-20260409-4837ecedf1ce