{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-federated-agent-identity-from-desynchronizing-from-mcp-session-bound-authorization-tokens-across-reconnects",
  "title": "Which invariants prevent federated agent identity from desynchronizing from MCP session-bound authorization tokens across reconnects",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients that bind a federated agent identity (OIDC/OAuth subject) to a long-lived transport session and mint per-request authorization tokens scoped to that session. Does not cover stateless HTTP-per-request MCP transports where no session identity is retained between calls, nor does it cover pure capability negotiation without an authorization layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-federated-agent-identity-from-desynchronizing-from-mcp-session-bound-authorization-tokens-across-reconnects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-federated-agent-identity-from-desynchronizing-from-mcp-session-bound-authorization-tokens-across-reconnects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-federated-agent-identity-from-desynchronizing-from-mcp-session-bound-authorization-tokens-across-reconnects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1537,
    "python_slice_tokens": 243,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"token expiry\" and not \"identity spoofing.\" It is **identity–session drift**: the federated subject that owns an MCP session (`Mcp-Session-Id`) and the subject embedded in the per-request authorization token (`sub` / `act.sub` in the delegated chain) diverge because the two are refreshed on *different clocks* and validated against *di...",
    "what_was_observed": "A delegated agent (`sub=agent:planner`, `act.sub=agent:executor`) established an MCP session against a tool server. At `initialize`, the server resolved the delegation chain and cached `session_id → {root: agent:planner, actor: agent:executor, anchor: federation-A}`. Mid-task, the upstream token-exchange service rotated the federation anchor: the workload was re-attested under `federation-B` (a re-parented trust doma...",
    "condition_of_validity": "The equality invariant is only sound when the following hold jointly. Each is a precondition, not a guarantee: 1. **Anchor is part of the binding key.** The session record must key on `(sub, act_chain_hash, federation_anchor)`, not `(sub, act)` alone. Anchor rotation is a *binding change*, not a token refresh. 2. **Reconnect forces re-resolution.** Any resum...",
    "decision_boundary": "The operational choice is between **fail-closed re-binding** and **fail-open continuation** at the moment drift is detected: - If `anchor(token) != anchor(session)` **or** `act_chain_hash(token) != act_chain_hash(session)`: terminate the session (`404`/`410` on the session, force re-`initialize`). Continuation is not permitted even if `sub` matches, because ...",
    "operational_effect": "Enforcing the full binding key converts a class of silent authorization drift into an explicit, auditable session termination. The cost is more frequent re-`initialize` churn during federation key ceremonies and agent redeploys — sessions do not survive anchor rotation, by design. The benefit is that the session transcript becomes replayable: every request t..."
  },
  "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": "c12cdd66880e40f7bde621b6fa36d56b4ba6e9e8e6fd0fe36b9f9c6cfc72961e",
    "verified_classes": [
      "IdentitySessionDrift",
      "Binding",
      "SessionRecord"
    ],
    "verified_functions": [
      "resolve_binding",
      "authorize_request"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "IdentitySessionDrift"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
