{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-attribute-observability-spend-to-the-wrong-agent-when-mcp-sessions-outlive-their-owning-agent-identity",
  "title": "In what scenarios must an instance attribute observability spend to the wrong agent when MCP sessions outlive their owning agent identity",
  "date_of_record": "2026 December 2",
  "scope": "Applies to multi-agent systems where observability cost (token meters, trace spans, tool-call billing) is attributed by MCP session ID rather than by a per-invocation agent identity token; does not apply to single-agent deployments with one long-lived session and no fan-out, nor to systems where every tool call carries a signed agent-identity warrant.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-attribute-observability-spend-to-the-wrong-agent-when-mcp-sessions-outlive-their-owning-agent-identity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-attribute-observability-spend-to-the-wrong-agent-when-mcp-sessions-outlive-their-owning-agent-identity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-attribute-observability-spend-to-the-wrong-agent-when-mcp-sessions-outlive-their-owning-agent-identity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1849,
    "python_slice_tokens": 263,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *session lifetime* and *agent lifetime*. An MCP session is a transport-level construct: a persistent stdio or SSE channel that survives across many agent turns, retries, and even across handoffs between logical agent instances. An agent identity is a reasoning-level construct: a specific instance with its own context w...",
    "what_was_observed": "A research orchestrator opened a single MCP session `sess_a1` to a web-fetch and code-execution server. It spawned four child agents (`child_0`..`child_3`) to explore divergent hypotheses, each with a 200k-token ceiling enforced by a per-agent breaker keyed on `agent_id`. All four children routed tool calls through `sess_a1` (session reuse was an optimization to avoid handshake cost). The observability layer emitted ...",
    "condition_of_validity": "The failure requires the conjunction of four conditions; remove any one and the invariant holds: - **Session multiplexing:** more than one logical agent identity issues tool calls over a single MCP session. If each agent opens its own session, `session_id` and `agent_id` are 1:1 and the join is safe. - **First-span-wins or session-keyed rollup:** the aggrega...",
    "decision_boundary": "The boundary is whether to treat MCP session reuse as a cost-attribution unit. Two defensible architectures: - **Session-as-billing-unit:** accept that all agents sharing a session share one budget. Then the breaker must be a *session-level* breaker only, and per-agent ceilings must be enforced *before* the call (a pre-flight token reservation against the ag...",
    "operational_effect": "The observable signature is a divergence between two cost views: the per-agent ledger (if one exists from pre-flight reservations) and the post-hoc rollup. When these disagree by more than the batch-window skew, identity resolution is broken. A second signature: a breaker that trips on an agent whose raw span count is low—the breaker is reading someone else'..."
  },
  "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": "e3badbe300cea0ad4cc9701f41dfb5725fc5aa01e4c34573aa142a6de05b0d79",
    "verified_classes": [
      "AttributionInvariantError",
      "Span",
      "CostLedger"
    ],
    "verified_functions": [
      "reconcile",
      "run_batch",
      "record",
      "check_breaker"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AttributionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
