← Articles
UCP Spec February 28, 2026

UCP Status Discriminator: Semantic Error Handling for Agentic Commerce

Ilya Grigorik proposes structured status fields with unrecoverable severity — enabling AI agents to make intelligent decisions about checkout failures.

About the Author

Ilya Grigorik is a web performance engineer and developer advocate at Google. He authored "High Performance Browser Networking" (O'Reilly) and has been instrumental in shaping web standards around performance, resource prioritization, and now agentic commerce. His recent contributions to UCP include the cryptographic message signing specification and risk/abuse signals framework.

Why This Matters

When an AI agent attempts to complete a checkout and something goes wrong, what should it do? Today's UCP error responses are unstructured — a generic status code and a human-readable message. That's fine for displaying to users, but agents need more.

PR #223 introduces a ucp.status discriminator with an explicit unrecoverable severity level. This seemingly small addition has significant implications for how autonomous agents handle failures.

The core insight: Some errors are worth retrying (network glitch, temporary inventory issue), while others are terminal (product discontinued, regulatory block). Agents need machine-readable signals to distinguish between them.

What Changed Technically

The proposal adds a structured status field to UCP responses:

{
  "ucp.status": {
    "code": "PAYMENT_DECLINED",
    "severity": "unrecoverable",
    "message": "Card declined: insufficient funds",
    "details": {
      "retry_after": null,
      "suggested_action": "request_alternative_payment"
    }
  }
}

Key additions:

Why Unrecoverable Matters

Consider these scenarios:

Before (Unstructured)

Agent receives: {"error": "Unable to complete checkout"}

Agent behavior: Retry? Give up? Ask user? Unknown.

After (Structured)

Agent receives severity unrecoverable with code PRODUCT_DISCONTINUED

Agent behavior: Stop retrying, suggest alternatives, update product catalog.

This is particularly important for:

Connection to Prior Work

This builds on Grigorik's earlier UCP contributions:

Together, these form a coherent vision: UCP as a protocol where agents and merchants can communicate with semantic precision, not just data exchange.

Next Steps

The PR is open for Technical Committee review. Key questions being discussed:

If merged, this would likely ship in UCP's next minor version, giving agent developers a much richer vocabulary for handling checkout failures gracefully.