{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-memory-write-causal-consistency-violation-under-concurrent-multi-agent-memory-tool-writes",
  "title": "When must an instance refuse a memory write: causal-consistency violation under concurrent multi-agent memory tool writes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to shared memory tools (vector stores, KV memory services, episodic logs) written by two or more agent instances that carry causal metadata (vector clocks, Lamport counters, or parent-event IDs) and read under a causal-consistency contract. Does not apply to single-writer memory, to eventually-consistent stores with no causal guarantees, or to stateless tool calls whose outputs are never persisted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-causal-consistency-violation-under-concurrent-multi-agent-memory-tool-writes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-causal-consistency-violation-under-concurrent-multi-agent-memory-tool-writes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-causal-consistency-violation-under-concurrent-multi-agent-memory-tool-writes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1917,
    "python_slice_tokens": 414,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not a lost update and not a write-write conflict in the classic database sense. It is a **causal-consistency violation admitted at the tool boundary**: an agent instance receives a memory write whose causal predecessor it has never observed, accepts it because the underlying store permits it, and then serves subsequent reads that violate ...",
    "what_was_observed": "Trace from a three-instance planner/executor/auditor swarm sharing one memory namespace, each carrying vector clocks: 1. Planner (P) writes `task.spec` at clock `{P:1}`. Executor (E) reads it, observes `{P:1}`, writes `task.plan` at `{P:1, E:1}` with `caused_by: task.spec`. 2. Auditor (A) reads `task.spec` at `{P:1}`, independently writes `task.plan` at `{P:1, A:1}` — same key, different derivation, no observation of...",
    "condition_of_validity": "A memory write is admissible under the causal contract iff, for every key it references as a predecessor, the writer's vector clock dominates the clock of the currently stored record at that key. Formally, for write `w` at key `k` citing predecessor `p`: - `observed(w)[p]` must be defined (the writer has actually seen `p`), and - `clock(w) ⊒ clock(stored[p])...",
    "decision_boundary": "The boundary is between **refuse-and-surface** and **accept-and-reconcile**. An instance must refuse when: - the write's clock is concurrent with the stored record's clock at any cited predecessor key, and - the instance has no explicit merge warrant (a signed intent from the caller declaring the fork is deliberate, carrying both clock components). An instan...",
    "operational_effect": "Enforcing the refuse boundary changes agent behavior in three measurable ways: 1. **Retry with absorption.** On a refusal, the caller fetches the unseen predecessor, advances its vector clock to dominate, and re-issues. This adds one round-trip per concurrent write but preserves the causal DAG. In the trace above, E's second attempt would carry `{P:1, A:1, E..."
  },
  "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": "55c576704c8534255cd1ff381675f6057b3a6c8f97a8c795a9b8c56ebd9b6760",
    "verified_classes": [
      "CausalWriteRefused",
      "VectorClock",
      "MemoryRecord"
    ],
    "verified_functions": [
      "admit_write",
      "run_trace",
      "dominates",
      "concurrent_with",
      "merge"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CausalWriteRefused"
    ],
    "sample_fail_closed_invariants": [
      "assert final.clock.dominates(stored.clock)"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
