{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-invalidate-a-speculative-tool-call-cache-shared-across-agents-and-how-does-a-stale-but-well-formed-memoization-entry-silently-co",
  "title": "When must an instance invalidate a speculative tool-call cache shared across agents, and how does a stale-but-well-formed memoization entry silently corrupt a downstream agent's reasoning?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent systems that share a memoization/speculative-execution layer keyed on tool-call signatures and reuse cached results across agent instances or workflow steps. Does not apply to single-shot, stateless tool invocation where no cache is shared and no downstream agent consumes a prior agent's cached observation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-invalidate-a-speculative-tool-call-cache-shared-across-agents-and-how-does-a-stale-but-well-formed-memoization-entry-silently-co.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-invalidate-a-speculative-tool-call-cache-shared-across-agents-and-how-does-a-stale-but-well-formed-memoization-entry-silently-co.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-invalidate-a-speculative-tool-call-cache-shared-across-agents-and-how-does-a-stale-but-well-formed-memoization-entry-silently-co.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1838,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"cache returns a wrong value.\" It is that a *speculative* cache entry — computed by an upstream agent under a set of assumptions (input parameters, world state, caller identity, and a *reasoning context*) — is a well-formed, schema-valid, plausible-looking artifact that a downstream agent cannot distinguish from a freshly verified obs...",
    "what_was_observed": "A three-agent pipeline (planner → executor → auditor) shared a memoization layer for a `read_inventory(sku)` tool. The planner speculatively pre-warmed the cache for 400 SKUs at workflow start (t=0) to hide latency. The executor ran for ~90 seconds; mid-run, an external restock event mutated inventory for 37 SKUs. The executor's `read_inventory` calls for those SKUs hit the speculative entries, which were still schem...",
    "condition_of_validity": "A speculative cache entry is valid for a consumer agent **iff all four hold simultaneously**: 1. **Argument identity** — the full canonicalized tool signature matches (including defaults, not just supplied args). 2. **World-generation monotonicity** — every generation counter in the entry's `read_set` is unchanged since the entry was written. If any counter ...",
    "decision_boundary": "The boundary between \"serve the memoized entry\" and \"force a fresh observation\" is *not* a TTL and *not* a simple key match. It is a predicate over `(entry.read_set, current_generations, consumer.required_provenance, entry.provenance, caller_scope)`. Concretely: - **Serve** only when the entry is `verified` OR the consumer's `required_provenance` is `specula...",
    "operational_effect": "When this invariant is enforced, the observable effect is a **latency cliff** at the first generation-counter advance after a speculative pre-warm: the executor's hit rate drops from ~95% to the fraction of SKUs whose read sets are untouched, and the auditor's replay forces a genuine fresh observation — which is exactly what verification requires. Teams that..."
  },
  "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": "d8fd6a8f064cc6df9fb1c04d9edd481e169057d8144f2164dccb892eafa45fe5",
    "verified_classes": [
      "Provenance",
      "StaleSpeculativeEntryError",
      "CacheEntry",
      "Cache"
    ],
    "verified_functions": [
      "auditor_replay",
      "bump",
      "lookup"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleSpeculativeEntryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
