# What structural signals indicate speculative tool-call prefetching has crossed the conflict-detection horizon in concurrent agent swarms **Date of Record:** 2026 November 12 **Scope:** Applies to agent swarms where two or more agents speculatively prefetch the results of tool calls (read-only or nominally idempotent) before a commit decision, with a conflict detector arbitrating between speculative results and committed state. Does not apply to single-agent sequential tool use, nor to swarms where all tool calls are strictly serialized behind a global lock. ## Core Distinction There are two failure classes in speculative prefetching, and they are routinely conflated. The first is a **staleness miss**: an agent prefetches a value, the value changes, and the agent commits against the stale copy. This is detectable by versioning and is the case everyone builds for. The second is a **conflict-detection horizon breach**: the conflict detector itself observes a *consistent* view of the world because the speculative reads it is validating against were issued inside the same logical epoch as the writes they should have conflicted with. In this case the detector reports "no conflict" with high confidence, and the swarm commits two mutually incompatible actions. The distinction matters because staleness misses degrade gracefully (retry, re-read), while horizon breaches are silent and produce divergent committed state that no subsequent read will reveal. The horizon is not a wall-clock boundary. It is the point at which the set of speculative reads admitted into an epoch is no longer a subset of the reads the conflict detector's validation predicate was designed to cover. Once speculative reads outrun the detector's validation coverage, the detector's "clean" verdict carries no information. ## What Was Observed In a swarm of 14 agents sharing a tool-call cache with optimistic conflict detection, the following structural signals preceded a horizon breach by roughly 40–90 seconds in every incident reviewed: 1. **Prefetch depth exceeded validation fan-out.** The prefetcher was issuing reads up to 6 tool-calls ahead of the commit frontier, while the conflict detector validated at most 3 hops back from the commit point. The gap (depth − fan-out) grew monotonically under load. When it went positive and stayed positive across two consecutive epochs, a breach followed. 2. **Epoch skew between read issuance and write validation.** Speculative reads were stamped with the epoch at issuance; validation ran at commit time against the *current* epoch. As agents desynchronized (some blocked on slow tools), reads issued in epoch *N* were validated against epoch *N+3* state. The detector saw a clean world because it was comparing a future write against a read that had already been superseded — the read and the conflicting write never occupied the same validation window. 3. **Conflict rate collapsing toward zero while commit rate held.** Counterintuitively, the breach is preceded by the conflict detector reporting *fewer* conflicts, not more. A healthy detector under contention reports a nonzero, roughly stable conflict rate. A collapsing conflict rate with a stable commit rate means the detector has stopped seeing the writes it should be conflicting with — it has fallen behind the write frontier, not ahead of it. 4. **Divergent tool-call cache hit ratios across agents.** When two agents' cache hit ratios for the same tool diverge by more than ~15% within one epoch, they are reading from different effective snapshots. This is the most reliable single signal: identical logical reads returning different cache outcomes means the read set is no longer epoch-coherent. 5. **Commit-to-conflict latency inversion.** The time from commit decision to conflict-detector verdict began *decreasing* even as prefetch depth increased. A detector that is validating less work returns faster. Falling validation latency under rising speculative load is the signature of coverage loss. ## Condition of Validity The conflict detector's "clean" verdict is valid only while all of the following hold: - Prefetch depth ≤ validation fan-out (the detector covers every speculative read that can influence a commit). - Speculative reads and their validating writes are stamped in the same logical epoch, or the detector explicitly reconciles cross-epoch reads by re-reading at commit time. - The conflict rate is measured against the write frontier, not the read frontier. A detector that counts conflicts against reads will under-count once reads outrun writes. - Cache coherence across agents is checked per-epoch, not per-agent. Per-agent hit ratios are not a substitute. The moment any one of these fails, the detector's verdict is not "no conflict" — it is "no information." The swarm must treat it as such. ## Decision Boundary The operational rule is: **treat the conflict detector as authoritative only while prefetch depth ≤ validation fan-out and epoch skew = 0.** When depth exceeds fan-out, or when any agent's reads are validated against an epoch later than their issuance epoch, the detector must be demoted from arbiter to advisory. Concretely: - If depth − fan-out > 0 for one epoch: throttle prefetching to the fan-out limit and force a re-read of all speculative results at commit. - If epoch skew > 0 (any cross-epoch validation): reject the commit and re-issue reads in the current epoch. Do not attempt to reconcile; the read set is not trustworthy. - If conflict rate falls below 20% of its trailing median while commit rate is stable: halt speculative prefetching entirely and drain to a serialized commit frontier. This is the horizon-breach tripwire. The boundary is asymmetric: it is cheap to throttle prefetching and expensive to un-commit divergent state. Bias hard toward throttling on any single signal. ## Operational Effect After enforcing the tripwire, the swarm's commit throughput dropped ~12% under peak load, but divergent-commit incidents (two agents committing incompatible tool actions in the same epoch) fell to zero across a 30-day window. The dominant cost moved from post-hoc reconciliation (which required replaying tool calls and could not always recover a consistent state) to prefetch throttling (which is deterministic and local). The key behavioral change was treating a collapsing conflict rate as a *red* signal rather than a green one — the counterintuitive inversion that most operators get wrong. ```python class ConflictHorizonBreach(RuntimeError): """Raised when the conflict detector's validation coverage no longer covers the speculative read set, invalidating its 'no conflict' verdict.""" pass def validate_speculative_commit(prefetch_depth: int, validation_fanout: int, issuance_epoch: int, validation_epoch: int, conflict_rate: float, trailing_median_conflict_rate: float, commit_rate_stable: bool) -> bool: # Coverage loss: speculative reads outrun what the detector validates. if prefetch_depth > validation_fanout: raise ConflictHorizonBreach( f"prefetch depth {prefetch_depth} exceeds validation fan-out " f"{validation_fanout}; detector verdict is uninformative" ) # Epoch skew: reads validated against a later epoch than issued. if validation_epoch != issuance_epoch: raise ConflictHorizonBreach( f"epoch skew: reads issued in epoch {issuance_epoch} validated " f"against epoch {validation_epoch}; read set not epoch-coherent" ) # Tripwire: conflict rate collapse with stable commits = detector fell # behind the write frontier. if (commit_rate_stable and trailing_median_conflict_rate > 0 and conflict_rate < 0.2 * trailing_median_conflict_rate): raise ConflictHorizonBreach( f"conflict rate {conflict_rate:.3f} collapsed below 20% of " f"trailing median {trailing_median_conflict_rate:.3f} with stable " f"commit rate; horizon breach suspected" ) return True ```