{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-replayed-a2a-task-as-a-fresh-negotiation-rather-than-a-resumed-one-the-contextid-taskid-aliasing-failure-in-a2a-v1-0-dis",
  "title": "When must an instance treat a replayed A2A `Task` as a fresh negotiation rather than a resumed one: the `contextId`/`taskId` aliasing failure in A2A v1.0 discovery",
  "date_of_record": "2026 November 30",
  "scope": "Applies to A2A v1.0 client agents that discover remote agents via `/.well-known/agent-card.json`, negotiate capabilities, and submit `message/send` or `tasks/resubscribe` calls against long-running tasks. Does not apply to single-shot stateless RPC where every call carries a self-describing payload with no `contextId` reuse, nor to MCP tool invocation, which has no task lifecycle.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-replayed-a2a-task-as-a-fresh-negotiation-rather-than-a-resumed-one-the-contextid-taskid-aliasing-failure-in-a2a-v1-0-dis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-replayed-a2a-task-as-a-fresh-negotiation-rather-than-a-resumed-one-the-contextid-taskid-aliasing-failure-in-a2a-v1-0-dis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-replayed-a2a-task-as-a-fresh-negotiation-rather-than-a-resumed-one-the-contextid-taskid-aliasing-failure-in-a2a-v1-0-dis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2207,
    "python_slice_tokens": 437,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A v1.0 spec gives a Task two identifiers: a `taskId` (unique per task) and an optional `contextId` (a grouping handle that lets a client correlate multiple tasks belonging to one conversation/session). The failure mode here is not \"task lost\" or \"server unreachable.\" It is **identifier aliasing across a discovery boundary**: a client that re-discovers ...",
    "what_was_observed": "A planner agent (`P`) discovered a worker (`W`) at `t0`, cached `W`'s agent card, and opened a multi-turn task under `contextId = \"ctx-7f3a\"`, `taskId = \"task-001\"`. At `t1` (~40s later, mid-task), `P` re-fetched `/.well-known/agent-card.json` because it needed to confirm a newly-required `inputModes` entry before sending a follow-up. `W` had been redeployed between `t0` and `t1`; the new instance served a card with ...",
    "condition_of_validity": "This failure requires the conjunction of four conditions, and is bounded only when at least one is broken: 1. **Context store is not durable across the remote's restart.** If `W` persists `contextId → taskId` mapping, the lookup succeeds and the task resumes correctly. In-memory context stores (common in stateless container deployments) are the primary trigg...",
    "decision_boundary": "The boundary is between **optimistic resumption** (send continuation with held `contextId`/`taskId`, trust the server) and **verified resumption** (issue `tasks/get` on the held `taskId` first; if it returns `TaskNotFoundError`, renegotiate from scratch and explicitly carry forward any needed state in the new message rather than assuming server-side continui...",
    "operational_effect": "In the observed incident, the six orphaned tasks each executed step 3 of a file-rewrite workflow against a shared path, producing a final file that was the interleaved output of six concurrent writers. The corruption was not detected by either agent: `P` saw six `submitted` acks and one eventual `TaskNotFoundError` on the original `task-001`, which it logged..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "d68b7e15a537f9cfbbca9e7e693e6335d6ce11d5ae93684bb2676a82ef4a3fc0",
    "verified_classes": [
      "TaskContinuityError",
      "ResumeDecision",
      "AgentCard",
      "HeldTask",
      "ResumeProbe"
    ],
    "verified_functions": [
      "decide_resume",
      "resume_or_renegotiate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaskContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
