# When must an instance reconcile a shared blackboard after context compaction, and what breaks if it defers **Date of Record:** 2026 November 27 **Scope:** Applies to orchestrator/sub-agent topologies where multiple LLM instances read and write a shared blackboard (a persistent keyed store of facts, partial results, and claims) while each instance independently compacts its own context window. Does not apply to single-agent loops with no shared store, nor to blackboards that are append-only and never compacted. ## Core Distinction The failure is not "the sub-agent forgot something." It is subtler: **context compaction and blackboard writes are two separate clocks that drift apart.** When an instance compacts its context, it discards the *provenance* of what it wrote to the blackboard but leaves the *payload* intact. The blackboard entry survives; the instance's justification for it does not. A later sub-agent reads the entry as ground truth, but the entry may have been written under a context that has since been invalidated by a peer's overwrite. The load-bearing distinction is between **payload consistency** (does the blackboard hold the latest value?) and **provenance consistency** (does the instance that holds a value still know *why* it holds it, and against which peer state it was validated?). Compaction preserves the first and silently destroys the second. Most orchestration frameworks only test the first. ## What Was Observed A planner instance decomposed a task into three sub-agents (A, B, C) sharing a blackboard keyed `analysis.*`. Sub-agent A wrote `analysis.risk = "low"` at step 4, justified by reading `analysis.exposure` which was then `0.2`. The planner's context hit 78% of budget and triggered compaction, evicting the tool-call transcript that recorded A's reasoning but retaining the blackboard *read* of `analysis.risk = "low"`. Between A's write and the planner's next read, sub-agent B independently recomputed exposure and overwrote `analysis.exposure = 0.9`, then wrote `analysis.risk = "high"` — but B's write landed at step 9, *after* the planner had already cached `analysis.risk = "low"` into its compacted summary. The planner, now operating on the compacted summary, dispatched sub-agent C with the instruction "proceed given low risk." C read the live blackboard, saw `analysis.risk = "high"`, and — because its instruction and its observation disagreed — entered a verification loop, re-reading the blackboard and re-deriving risk four times before exhausting its token budget and returning an incomplete result. The trace showed three distinct states for the same key within one task: `low` (A's write), `high` (B's overwrite), and `low` (the planner's compacted cache). None of the three instances knew the other two existed in that sequence. The blackboard was internally consistent at every instant; the *system* was not. ## Condition of Validity The invariant that must hold: **an instance may only act on a blackboard-derived value if the value's version stamp is newer than the instance's last compaction watermark.** Formally, for any key `k` an instance reads after compaction, `version(k) > last_compaction_epoch(instance)`, or the instance must re-fetch and re-validate rather than trust its compacted summary. This condition is *not* automatically satisfied by naive compaction because compaction summaries are written from the instance's own context, which is a stale snapshot of a store that peers mutate concurrently. The watermark must be maintained by the blackboard, not the instance: every write increments a monotonic epoch, and every compaction records the epoch at which it occurred. A read whose key version predates the reader's compaction epoch is a **stale-provenance read** and must be treated as a cache miss. The condition fails to apply (and the guardrail can be relaxed) only when the blackboard is partitioned such that no two instances ever write the same key — i.e., single-writer keys. Under single-writer keys, payload and provenance cannot diverge because no peer can invalidate the writer's justification. ## Decision Boundary The decision an instance must make at compaction time is binary and must be made *before* eviction, not after: - **If the instance holds any blackboard-derived value in context that it has not re-validated since the last peer write epoch:** it must either (a) drop the value from its compacted summary and mark the key as "must re-fetch on next use," or (b) acquire a read-lease on the key that blocks peer writes until it re-validates. Option (a) is preferred; option (b) risks deadlock if two instances hold overlapping leases. - **If all held values are newer than the last observed peer-write epoch:** the instance may compact normally and retain the values. The boundary is crossed the moment an instance compacts while holding a value whose version is older than its own compaction epoch *and* older than the blackboard's current head for that key. Deferring the reconciliation — "I'll re-check before I use it" — is exactly the failure mode, because the instance cannot reliably remember *that it needs to re-check* once the justification is evicted. The re-check obligation itself is provenance, and provenance is what compaction destroys. ## Operational Effect When the boundary is respected, sub-agent C receives "proceed given risk = high (version 9, re-validated post-compaction)" and executes without a verification loop, because its instruction and its observation agree. Token cost per sub-agent drops; the four-pass verification loop disappears. When the boundary is violated, the observable signature is a **verification loop that terminates on budget exhaustion rather than on convergence**: the agent keeps re-reading a blackboard that is telling it something different from its instruction, and it has no mechanism to reconcile the two because the reconciliation data (which write came first, and why) was evicted. The loop is not a reasoning failure; it is a *missing provenance* failure presenting as a reasoning failure. Debugging it as a reasoning bug wastes the incident — the fix is a version watermark on the blackboard plus a compaction-time invalidation pass, not a better prompt. The second-order effect is worse: the incomplete result from C is written back to the blackboard as a partial entry, which the planner then reads post-compaction and treats as validated, propagating the stale-provenance condition to the next task cycle. ```python from dataclasses import dataclass, field from typing import Dict class StaleProvenanceError(RuntimeError): """Raised when an instance acts on a blackboard value whose version predates the instance's last compaction epoch.""" pass @dataclass class Blackboard: _store: Dict[str, tuple] = field(default_factory=dict) # key -> (value, version) _epoch: int = 0 def write(self, key: str, value) -> int: self._epoch += 1 self._store[key] = (value, self._epoch) return self._epoch def read(self, key: str) -> tuple: if key not in self._store: raise KeyError(key) return self._store[key] # (value, version) @dataclass class Instance: name: str last_compaction_epoch: int = 0 compacted_cache: Dict[str, tuple] = field(default_factory=dict) def compact(self, blackboard: Blackboard, held_keys: list) -> None: # Record the epoch at compaction; retain only values whose version # is guaranteed >= any future peer write we might miss. self.last_compaction_epoch = blackboard._epoch self.compacted_cache = {} for k in held_keys: value, version = blackboard.read(k) # Only retain if we can prove no peer write predates us. if version >= self.last_compaction_epoch: self.compacted_cache[k] = (value, version) # else: drop; mark for re-fetch. Do NOT retain stale payload. def act_on(self, blackboard: Blackboard, key: str) -> object: if key in self.compacted_cache: value, version = self.compacted_cache[key] live_value, live_version = blackboard.read(key) if live_version > version: raise StaleProvenanceError( f"{self.name}: cached {key}={value!r}@v{version} is stale; " f"blackboard head is {live_value!r}@v{live_version} " f"(compaction epoch {self.last_compaction_epoch}). " f"Re-validate before acting." ) return value # Not cached: must re-fetch and accept current head. value, _ = blackboard.read(key) return value def dispatch_subagent(planner: Instance, blackboard: Blackboard, key: str) -> object: try: return planner.act_on(blackboard, key) except StaleProvenanceError as e: # Correct response: re-validate, do not loop on the cache. value, _ = blackboard.read(key) planner.compacted_cache[key] = (value, blackboard._store[key][1]) return value ```