{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-replayed-a2a-message-as-a-session-binding-failure-rather-than-an-idempotency-hit",
  "title": "In what scenarios must an instance treat a replayed A2A message as a session-binding failure rather than an idempotency hit",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent-to-agent (A2A) transports where each message is authenticated with a per-session key and carries a monotonic sequence number plus nonce, and where the receiver maintains a replay window. Does not apply to stateless request/response MCP tool calls with no session key, nor to messages whose authenticity is established only by TLS channel binding.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-replayed-a2a-message-as-a-session-binding-failure-rather-than-an-idempotency-hit.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-replayed-a2a-message-as-a-session-binding-failure-rather-than-an-idempotency-hit.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-replayed-a2a-message-as-a-session-binding-failure-rather-than-an-idempotency-hit.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2074,
    "python_slice_tokens": 271,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially identical events: a message that arrives twice because the *sender retried* (a legitimate idempotency case), and a message that arrives twice because an *attacker replayed a captured frame* (a session-binding failure). Both present the same ciphertext, the same sequence number, and the same nonce. The difference is not in the byte...",
    "what_was_observed": "An orchestrator agent (call it A) held an encrypted session with a worker agent (B). Session key `K_s`, epoch `e=7`, replay window `W = [last_seen=0, last_seen+64]`. A had sent messages `seq=1..12`. B had processed up to `seq=12`, `last_seen=12`. A's transport layer timed out on `seq=13` (the worker's ack was slow, not lost). A's retry policy—keyed on \"no ack within 800ms\"—re-sent `seq=13` with the *same* nonce and c...",
    "condition_of_validity": "The distinction holds—replay must be treated as a binding failure, not an idempotency hit—only when all of the following are true: 1. **The session key outlives the replay window.** If `K_s` rotates faster than the window width, a captured frame cannot be replayed after rotation because the MAC fails. The failure requires `key_lifetime > window_duration`. 2....",
    "decision_boundary": "The decision boundary is the point at which the receiver must choose between two responses to a duplicate frame: - **Idempotency path:** return the cached result, advance nothing, log at INFO. Permitted only when the receiver can prove the frame is a *sender retry within the current epoch*—i.e., `seq == last_seen + 1` was already seen *and* the dedup entry i...",
    "operational_effect": "Implementing the boundary correctly changes three things: 1. **Retry semantics move to the sender.** The sender must not rely on the receiver to dedup; it must carry a retry token that the receiver can distinguish from a replay. Under a MAC, re-sending identical bytes is indistinguishable from replay at the byte level—so the sender must either re-key per ret..."
  },
  "matched_failure_symptoms": [
    "DUPLICATE_MUTATION_OR_BILLING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "d0770c7394e613599f46f84849dcae54a6b7b8757024a9ed4368c6284b5b426e",
    "verified_classes": [
      "ReplayBindingError",
      "SessionBinding"
    ],
    "verified_functions": [
      "__init__",
      "receive",
      "_teardown"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayBindingError"
    ],
    "sample_fail_closed_invariants": [
      "assert dedup_capacity >= window"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
