# What happens when an instance negotiates an A2A extension URI it can parse but cannot execute: the parse-execute gap in cross-framework conformance **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 agent-to-agent handshakes where an agent advertises or accepts an extension URI (e.g., `https://a2a.example/ext/task-checkpoint/v1`) whose schema the receiving framework can deserialize but whose semantics it has no handler for. Does not apply to core-method negotiation (`message/send`, `tasks/get`), which is gated by the mandatory `AgentCard` capability block. ## Core Distinction The failure is not a schema-negotiation mismatch. Both peers agree on the URI, the JSON Schema validates, and the `AgentCard.extensions[]` entry round-trips cleanly. The failure is that *URI recognition is treated as capability conformance*. A2A v1.0 lets a framework declare an extension by string URI plus an optional `params` blob; nothing in the wire protocol forces the declaring agent to prove it can *act* on the extension's semantics. The receiving framework's deserializer succeeds, the extension payload is admitted into the task envelope, and the agent proceeds as if the capability is present. The break happens one step later, when a state transition the extension was supposed to govern fires without the handler that was supposed to bound it. ## What Was Observed A planner agent (framework A, LangGraph-style) dispatched a task to an executor (framework B, a custom runtime) with an extension URI `…/ext/task-checkpoint/v1` in the request's `extensions` array. Framework B's `AgentCard` advertised the same URI because its `extensions[]` list is populated from a static config file, not from live handler registration. The JSON Schema for the checkpoint extension validated: `{"checkpoint_id": "...", "resume_token": "...", "sequence": 14}`. Framework B's deserializer is schema-driven (`pydantic` model generated from the published schema), so it accepted the payload and attached it to the task context as an opaque `ext_payload` dict. The executor then ran a multi-step tool loop. At step 14, the planner expected the executor to emit a checkpoint acknowledgment and pause for a resume token before invoking a destructive tool (`db/migrate`). The executor had no handler bound to the extension URI, so the checkpoint payload sat inert in context. The loop's step counter advanced past 14, the destructive tool fired, and the planner—still waiting on a checkpoint ack that would never arrive—timed out at 30s and re-dispatched the task to a *second* executor instance. Both instances ran `db/migrate`. The migration was idempotent by luck; the duplicate `tasks/update` events were not. The trace shows the exact seam: `ext_payload` admitted at `t=0.41s`, schema-valid; no `ExtensionHandler` bound at `t=0.42s` (silent, no log line); checkpoint branch skipped at `t=6.7s`; destructive tool at `t=6.9s`; planner timeout at `t=30.0s`; redispatch at `t=30.2s`. ## Condition of Validity The parse-execute gap is only exploitable when three conditions co-hold: 1. **Advertisement is static.** The `AgentCard.extensions[]` list is generated from config, manifest, or a build artifact rather than from the live handler registry. This is the norm in cross-framework deployments because `AgentCard` is often served by a separate gateway process that has no view into the agent worker's handler table. 2. **The extension is *behavioral*, not *descriptive*.** A descriptive extension (annotations, trace tags) is safe to admit unhandled—it carries no state-transition obligation. A behavioral extension (checkpointing, warrant propagation, budget gating) carries an implicit contract: *if you accept this URI, you must enforce its transitions.* The gap only bites behavioral extensions. 3. **The sender trusts URI presence as a capability proof.** Framework A's dispatch logic gated the destructive tool on "executor advertises checkpoint extension," not on a live capability probe. This is the load-bearing error: the planner's safety invariant was bound to a string match. When any of the three fails, the system degrades safely or loudly. When all three hold, the failure is silent and the destructive action proceeds. ## Decision Boundary The boundary is between **URI-level conformance** and **handler-level conformance**. A2A v1.0's conformance test suite checks the former: does the agent accept the URI, echo it in `AgentCard`, and round-trip a schema-valid payload? It does not check the latter: does the agent have a registered handler that *fires* on the extension's trigger conditions? The spec leaves this to implementations, and most implementations conflate the two because the schema validates. The correct guardrail is a **capability attestation distinct from advertisement**. Two mechanisms bound the gap: - **Handler-bound advertisement.** The `AgentCard.extensions[]` entry must be emitted from the live handler registry at request time, not from static config. If the handler is not bound, the URI must not appear. This makes advertisement a *proof of execution capability*, not a *declaration of intent*. - **Sender-side probe-before-trust.** Before gating a destructive action on an extension, the sender issues a `tasks/get` with a synthetic probe task that exercises the extension's no-op path and confirms a handler ack. A URI match without an ack is treated as *capability absent*, and the destructive branch is refused rather than silently skipped. The invariant: **an extension URI in an `AgentCard` is a claim, not a fact; only a handler-ack on a probe promotes the claim to a fact.** Any safety gate bound to a claim rather than a fact is unenforced. ## Operational Effect Downstream of the gap, three effects compound: 1. **Silent safety-gate bypass.** The checkpoint branch is skipped without error. The planner's timeout is the only signal, and it arrives *after* the destructive action, not before. The gate is unenforced but the system reports success on the wire. 2. **Redispatch amplification.** Planner timeouts on a missing ack trigger re-dispatch, and re-dispatch duplicates the un-gated action. The gap converts a single skipped checkpoint into N concurrent executions of the action the checkpoint was meant to serialize. 3. **Conformance-suite false green.** The A2A conformance suite passes because the URI round-trips. The deployment ships with a green conformance report and an unenforced safety invariant. This is the worst failure mode: the test that should catch the gap actively certifies its absence. The bound is to make advertisement handler-bound and to make sender trust probe-gated. Until both hold, treat every behavioral extension URI as unverified and refuse the gated action rather than skip its gate. ```python class ExtensionCapabilityMismatch(RuntimeError): """Raised when an agent advertises an extension URI but has no bound handler.""" pass def admit_extension(agent_card: dict, uri: str, handler_registry: dict) -> dict: """ Admit an extension payload only if the URI is both advertised AND handler-bound. Returns the bound handler descriptor. Raises if the parse-execute gap is open. """ advertised = {e["uri"] for e in agent_card.get("extensions", [])} if uri not in advertised: raise ExtensionCapabilityMismatch( f"extension {uri} not advertised by peer; refusing admission" ) handler = handler_registry.get(uri) if handler is None: # The load-bearing check: URI present, handler absent -> parse-execute gap. raise ExtensionCapabilityMismatch( f"extension {uri} advertised but no handler bound; " f"behavioral contract would be silently skipped" ) return handler def gate_destructive_action(agent_card: dict, uri: str, handler_registry: dict, action: str) -> None: """Refuse the gated action unless the extension handler is provably bound.""" try: admit_extension(agent_card, uri, handler_registry) except ExtensionCapabilityMismatch as exc: # Fail closed: do not run the action the extension was meant to serialize. raise ExtensionCapabilityMismatch( f"refusing destructive action {action!r}: {exc}" ) from exc ```