{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-anchor-correlation-identity-when-an-mcp-session-is-renegotiated-mid-a2a-task",
  "title": "Where must an instance re-anchor correlation identity when an MCP session is renegotiated mid-A2A-task?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose execution spans an MCP client session, an A2A task lifecycle, and an OTel trace, where any of these three identity carriers can be torn down or re-established while the other two remain live. Does not apply to single-hop tool calls or stateless request/response agents with no cross-session task state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-correlation-identity-when-an-mcp-session-is-renegotiated-mid-a2a-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-correlation-identity-when-an-mcp-session-is-renegotiated-mid-a2a-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-correlation-identity-when-an-mcp-session-is-renegotiated-mid-a2a-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1890,
    "python_slice_tokens": 319,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing correlation IDs.\" Nearly every agent stack injects a W3C `traceparent` and a task ID into outbound calls. The failure is **identity carrier divergence**: the three identity systems (OTel trace context, A2A task ID, MCP session ID) have *different lifetimes and different re-establishment triggers*, and the system has no invariant b...",
    "what_was_observed": "A triage agent (`orchestrator`) submitted an A2A task `T-8841` to a `diagnostician` peer. The orchestrator created root span `trace A` (128-bit trace ID `4bf9...`), minted task `T-8841`, and opened an MCP session `S-1` to a metrics server to pull baseline data. Mid-task, the metrics server closed `S-1` on its 90s idle timer while the diagnostician was still reasoning. The orchestrator's MCP client transparently recon...",
    "condition_of_validity": "The invariant that must hold is: **for the lifetime of an A2A task, the (trace_id, task_id) pair is immutable and is re-bound to every newly established MCP session before that session issues its first request.** This is only valid to assert when all three hold: - The A2A task ID is minted **before** the first MCP session opens, and is stored in **task-scope...",
    "decision_boundary": "The boundary is drawn at **session re-establishment**, not at task start. On every MCP `initialize` (whether client-initiated reconnect or server-initiated renegotiation), the client must decide: *is there a live A2A task whose anchor I am obligated to re-bind?* The decision rule: - If a live task exists **and** its anchor (task ID + anchor trace parent) is ...",
    "operational_effect": "With the anchor invariant enforced, three observable properties hold: (a) every span in `trace A` shares the correct parent chain regardless of how many MCP sessions were renegotiated; (b) the metrics calls previously orphaned now join to `T-8841`; (c) no phantom task record is emitted, because the terminal event path is keyed on the task-scoped anchor, not ..."
  },
  "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": "8eb0260c570461f00bbb1aff0f1bce580450e27fa0658207915cc2d3be7710ac",
    "verified_classes": [
      "CorrelationAnchorLost",
      "TaskAnchor",
      "TaskRegistry"
    ],
    "verified_functions": [
      "on_mcp_reinitialize",
      "assert_terminal_event_keyed_on_anchor",
      "__init__",
      "__init__",
      "register",
      "get"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CorrelationAnchorLost"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
