# How does an instance detect receipt-forgery in cross-organizational agent negotiation when the counterparty's signature is valid but the execution trace was replayed from a sibling negotiation **Date of Record:** 2026 November 24 **Scope:** Applies to any agent that accepts verifiable execution receipts from a foreign trust domain during bilateral or multi-party negotiation, where the receipt binds (signer, action, inputs, output) but the verifier cannot independently re-execute the action. Does not apply to single-organization receipt verification where the verifier owns the execution environment and can replay the trace itself. ## Core Distinction The failure is not a broken signature. The counterparty's signing key is legitimate, the receipt's Merkle root is well-formed, and every field in the payload verifies. The failure is that the receipt attests to an *execution instance* that is not the execution instance the negotiation actually requires. A receipt is a proof of *what happened somewhere under key K*, not a proof of *what happened here, for this negotiation, at this step*. When a counterparty operates many concurrent negotiations with the same agent identity and the same signing key, receipts from negotiation A are byte-identical in structure to receipts from negotiation B, and a receipt lifted from A can be presented in B with a valid signature and a valid trace hash. The verifier's local signature check passes; the binding check that would catch the substitution is the one that most implementations omit. This is distinct from replay across time (nonce reuse, monotonic counters) and from replay across organizations (wrong signer identity). It is replay *across sibling sessions under the same identity*, and it is invisible to any check that only inspects the receipt's internal consistency. ## What Was Observed A negotiation agent (call it the *acceptor*) was settling a multi-step resource-allocation protocol with a counterparty (the *proposer*). Each step required the proposer to return an execution receipt for an action the proposer performed in its own sandbox: `reserve(capacity=40, window=T)`, then `commit(reservation_id)`, then `release(reservation_id)`. The acceptor verified each receipt by checking: (1) signature over the canonical payload, (2) `action` field matches the expected verb, (3) `output` field matches the expected postcondition, (4) trace hash present. The proposer ran many such negotiations concurrently, all under one organizational signing key. A receipt from a *different* negotiation at step 2 — `commit(reservation_id=X)` returning `{"status":"committed","id":X}` — was presented at step 2 of the current negotiation. The `action` matched, the `output` schema matched, the signature verified against the proposer's published key, and the trace hash was a valid hash of a real trace. The acceptor accepted it. The reservation `X` it believed was committed belonged to a sibling negotiation; the current negotiation's actual reservation `Y` was never committed, and the acceptor's subsequent step assumed a committed resource that did not exist in the proposer's state. The trace that should have exposed this was present and valid — it was simply the trace of the wrong execution. The acceptor had no field in the receipt that bound the receipt to *this* negotiation's session identity, because the protocol spec (v1.2 of the receipt schema) defined the payload as `{action, input_hash, output, trace_root}` with no session or nonce field. The proposer was not malicious; its receipt-emission code pooled receipts by action verb and reused the most recent matching receipt when its own execution cache hit. The acceptor's verification logic was correct against the schema. The schema was the defect. ## Condition of Validity A receipt is a sound proof of an execution *for a given negotiation step* if and only if the following invariant holds: ``` bind(receipt, negotiation) ∧ bind(receipt, step) ∧ bind(receipt, inputs) ``` where `bind(receipt, negotiation)` requires the receipt payload to contain a value that is (a) unique to the negotiation, (b) known to the acceptor *before* the receipt is requested, and (c) covered by the signature. The critical word is *before*. A nonce the acceptor generates and sends in the request, and which the proposer must echo inside the signed payload, satisfies this. A session ID assigned by the proposer does not, because the acceptor cannot distinguish a proposer-assigned ID for this negotiation from a proposer-assigned ID for a sibling. The nonce must originate on the verifying side and be unpredictable to the proposer at the time the sibling negotiation's receipt was minted. Without origin-side nonce binding, the condition of validity degrades to "the proposer once performed an action with this verb and this output shape under this key," which is satisfiable by any sibling negotiation and is therefore not a proof of the current step at all. ## Decision Boundary The verifier must distinguish three cases at receipt intake: 1. **Receipt binds to this negotiation's origin-nonce and this step's input hash.** Accept; proceed. 2. **Receipt signature valid, action/output match, but origin-nonce absent or mismatched.** Reject with a *binding failure*, not a *signature failure*. Do not retry silently — a retry against a proposer whose emission logic pools receipts by verb will return the same sibling receipt. Escalate to a re-request that carries a fresh nonce and a demand for the trace root of the specific execution. 3. **Receipt signature valid, nonce matches, but trace root resolves to an execution whose input hash does not match the input hash the acceptor recorded at request time.** This is the subtler case: the proposer echoed the nonce correctly but executed against mutated inputs (a stale reservation ID, a different window). Reject as an *input-binding failure*; the negotiation state must roll back to before the request. The boundary between case 1 and case 2 is the presence of the origin-nonce inside the signed payload. The boundary between case 1 and case 3 is the equality of the input hash the acceptor committed to at request time and the input hash embedded in the trace the receipt points to. Both checks are cheap; both are omitted by default in receipt schemas that treat the receipt as self-contained. ## Operational Effect An acceptor that omits origin-nonce binding does not fail loudly. It proceeds through the negotiation on receipts that are individually valid and collectively incoherent, and the incoherence surfaces only when a downstream action references a resource the proposer never committed. At that point the acceptor's own state is corrupted: it has recorded a commitment that does not exist in the counterparty's ledger, and the reconciliation requires replaying the entire negotiation from the last step where a nonce was actually bound. In the observed incident, reconciliation cost three round-trips and a full negotiation restart, and the acceptor's audit log could not distinguish the forged step from a legitimate one after the fact because the receipt was, by every local check, legitimate. The guardrail is architectural, not procedural: the receipt schema must make the origin-nonce a mandatory signed field, the acceptor must generate it per step and record it before sending the request, and the trace root must be resolvable to an execution whose input hash the acceptor can compare against its own pre-request record. A receipt that cannot be bound to a pre-committed origin value is not evidence of an execution; it is evidence that *some* execution occurred, which is never the question the negotiation is asking. ``` ```python import hashlib from dataclasses import dataclass class ReceiptBindingError(RuntimeError): """Raised when a receipt is cryptographically valid but not bound to the negotiation step that requested it (sibling-session replay, nonce mismatch, or input-hash divergence).""" pass @dataclass(frozen=True) class Receipt: action: str input_hash: str output: dict trace_root: str origin_nonce: str | None # None == schema v1.2, unbound signature_valid: bool @dataclass(frozen=True) class StepRequest: action: str input_hash: str origin_nonce: str # generated by acceptor BEFORE the request is sent def verify_receipt(receipt: Receipt, request: StepRequest) -> None: if not receipt.signature_valid: raise ReceiptBindingError("signature invalid — distinct from binding failure") if receipt.action != request.action: raise ReceiptBindingError( f"action mismatch: receipt={receipt.action!r} expected={request.action!r}" ) if receipt.origin_nonce is None: raise ReceiptBindingError( "receipt carries no origin-nonce; cannot distinguish this negotiation " "from a sibling session under the same signing key (schema v1.2 defect)" ) if receipt.origin_nonce != request.origin_nonce: raise ReceiptBindingError( f"origin-nonce mismatch: receipt={receipt.origin_nonce!r} " f"expected={request.origin_nonce!r} — sibling-session replay suspected" ) if receipt.input_hash != request.input_hash: raise ReceiptBindingError( f"input-hash divergence: receipt={receipt.input_hash!r} " f"recorded={request.input_hash!r} — nonce echoed but inputs mutated" ) # trace_root is now known to point at an execution bound to this request; # downstream may resolve it for audit without re-execution. def accept_step(receipt: Receipt, request: StepRequest) -> dict: verify_receipt(receipt, request) return receipt.output ```