{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-opentelemetry-memory-tool-span-as-a-continuity-witness-rather-than-a-cache-hint",
  "title": "When must an instance treat an OpenTelemetry memory-tool span as a continuity witness rather than a cache hint?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that emit or consume GenAI semantic-convention spans (`gen_ai.tool.name`, `gen_ai.operation.name`, `gen_ai.agent.id`, custom `gen_ai.memory.*` attributes) around memory read/write tools, and that use those spans to reconstruct or validate state continuity across instance boundaries. Does not apply to pure in-process caches with no span emission, nor to observability pipelines that only aggregate latency/count metrics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-opentelemetry-memory-tool-span-as-a-continuity-witness-rather-than-a-cache-hint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-opentelemetry-memory-tool-span-as-a-continuity-witness-rather-than-a-cache-hint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-opentelemetry-memory-tool-span-as-a-continuity-witness-rather-than-a-cache-hint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1830,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A memory-tool span can carry two incompatible meanings that share the same wire shape. As a **cache hint**, the span says: \"a retrieval happened here; its payload may be reused if the key matches.\" As a **continuity witness**, the span says: \"this exact state transition was durably committed at this logical time, and any successor instance inheriting `gen_ai...",
    "what_was_observed": "A three-instance pipeline (planner → worker → verifier) shared a memory tool fronting a vector store with an eventually-consistent write path. Each `memory.store` call emitted a span with `gen_ai.operation.name=\"memory.store\"`, `gen_ai.memory.entry.id`, and `gen_ai.memory.key`. Each `memory.retrieve` emitted a span with the same entry id when a hit occurred. The resume controller for a restarted worker scanned the pl...",
    "condition_of_validity": "A memory-tool span is a valid continuity witness only when all of the following hold; otherwise it is a cache hint and must not anchor resume: - The span carries a **write-provenance attribute** (e.g., `gen_ai.memory.commit_seq` or `gen_ai.memory.durable=true`) that is set by the writer, not inferred by the reader. - The witness entry's `gen_ai.memory.entry....",
    "decision_boundary": "The boundary is crossed the moment a resume controller treats `gen_ai.operation.name=\"memory.retrieve\"` with `status=OK` as sufficient to set the resume anchor. Below the boundary (hint mode), the controller may use the retrieve span to propose a candidate key, then must issue a *confirmation* call that returns the write's commit sequence or durable flag and...",
    "operational_effect": "The practical consequence is a mandatory confirmation round-trip on every resume, adding one memory-tool call of latency and one span to the trace—cost that teams routinely try to eliminate by trusting the latest store span. That optimization is exactly the failure above: it trusts a store span's *emission* as proof of *durability*, when the store span's `st..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "3608c24503cdcd0256762db896277c02a92eae613cc5eb42acdcc3cdbf7cca77",
    "verified_classes": [
      "ContinuityWitnessError",
      "MemorySpan"
    ],
    "verified_functions": [
      "select_resume_anchor"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ContinuityWitnessError"
    ],
    "sample_fail_closed_invariants": [
      "no store span in lineage; cannot establish a witness, resume denied"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
