$ fssg build --deterministic --validate |

Parallel AI Agents Need Premise Invalidation

AI Engineering

Parallel agents do not mainly collide because they edit the same file. They fail because one agent acts on a premise that another agent has already made false.

That distinction changes the architecture.

A file lock can protect a write. A worktree can isolate a patch. Neither can tell us that an agent read config.yaml, inferred that port 8080 was authoritative, and then generated three changes whose validity depended on that value. If another agent changes the port before those changes land, the conflict is semantic even when every write targets a different file.

I think the missing runtime artifact is a premise ledger: a machine-readable map from observations to the planned actions that depend on them.

Disjoint writes are not independent work

Consider two coding agents working in separate worktrees:

  • Agent A changes the service port in config.yaml.
  • Agent B reads the old configuration and generates a deployment manifest, a health check, and documentation.

Git may merge the branches without a textual conflict. The repository may even compile. The result can still be wrong because B's three outputs encode a stale premise.

This is why “one agent per file” is only a write-partitioning rule. It reduces direct collisions, but it does not isolate reads. The same problem appears outside code: one agent repairs a Kubernetes deployment while another creates a canary from the deployment's old image; one updates a customer record while another drafts an action from the previous status.

The CoAgent paper gives this class of failure a database-grade framing. Its central target is serializability: a concurrent run should have an outcome equivalent to some valid serial order. The paper's measured Kubernetes example is especially useful because neither agent reasons incorrectly in isolation. The invalid state comes from the interleaving itself.

This extends an argument I made in Why AI Agents Should Propose Change Sets, Not Final State. A change set makes writes reviewable. It does not, by itself, preserve the observations that justified those writes. For concurrent execution, the proposal also needs its read dependencies.

The premise ledger

A useful ledger does not dump the full context window. It records only the facts that became load-bearing for a planned effect.

{
  "premise_id": "p-17",
  "subject": "repo://config.yaml#service.port",
  "observed_version": "sha256:6f2…",
  "observed_value": 8080,
  "dependents": [
    "effect://deploy/service-port",
    "effect://healthcheck/url",
    "effect://docs/example"
  ],
  "invalidated_by": null,
  "repair_policy": "re-read-and-replan-dependents"
}

The important field is not observed_value. It is dependents.

Traditional optimistic concurrency control keeps a read set and validates versions before commit. That works well when a transaction is short, deterministic, and buffered. Convex, for example, describes a transaction as a declarative write proposal based on versioned reads; if a read version changed, the transaction can be rerun because its mutations are deterministic and have not escaped the database.

An agent task is different. It may spend minutes on inference, produce intermediate artifacts, and call external systems whose effects cannot be hidden in a private buffer. Restarting the whole task after one stale read can discard valid work. Blindly retrying can also repeat an irreversible side effect.

The premise ledger localizes the damage. If service.port changes, the runtime can invalidate p-17 and identify exactly three dependent effects. An unrelated migration plan remains valid. A generated test that did not depend on the port remains valid. Recovery becomes a graph operation before it becomes another model call.

A runtime protocol with four moves

I would implement premise invalidation as four explicit runtime moves.

1. Capture observations with versions

Every shared-state read should return an identity and version alongside its value. The version may be a file hash, database revision, Git object ID, Kubernetes resourceVersion, API ETag, or a domain-specific generation number.

A plain tool result says what the agent saw. A versioned observation says which state made that result true.

This complements freshness contracts. Freshness limits how old an observation may be at decision time. Version identity detects whether the observed object changed, even inside that time window. Age and invalidation are separate failure modes.

2. Bind planned effects to premises

Before an effect can enter a change set, the runtime should require a compact dependency list:

plan(effect=e-42)
requires(p-17, p-21)

The model may propose this mapping, but the runtime owns and validates its shape. Tool schemas can supply obvious dependencies automatically: a render_deployment(config) tool already knows that its output depends on the configuration version it read.

The goal is not perfect provenance for every token. The goal is to expose the few observations whose change would alter permission, target, parameters, or expected postcondition.

3. Invalidate forward, not globally

When another agent commits a write, the runtime finds matching premise subjects and marks them invalid. It then walks only the dependent-effect edges.

The response depends on effect state:

Effect state Runtime response
proposed regenerate or drop it
approved, not executed revoke approval and revalidate
executed, reversible run compensation, then replan
executed, irreversible stop propagation and escalate

This is where the premise ledger connects naturally to stable effect identities and authority leases. An effect needs a stable identity so invalidation targets the right operation. Its authority must still be valid when the repaired operation is considered again.

4. Commit only at quiescence

A task should not report completion while premise invalidations or repairs remain in flight. “All agents returned” is not a consistency condition.

The runtime needs a quiescence gate:

no pending invalidations
AND no dependent effect awaiting repair
AND all executed effects satisfy current postconditions

Only then can it emit a completion artifact. This prevents a familiar false success: every worker says “done” while the combined state satisfies no coherent execution order.

What CoAgent adds—and what remains a boundary

CoAgent proposes a more ambitious protocol called MTPO. It fixes an agent order at launch, tracks declared read/write footprints, filters reads according to that order, notifies agents when later writes invalidate their premises, and uses registered inverse actions to reorder reversible writes. Instead of locking or aborting an entire agent transaction, it asks the affected agent to repair only the relevant trajectory.

That is an important shift: notification replaces abort as the load-bearing concurrency primitive.

It is also not a free guarantee. The paper states explicit assumptions: shared actions must pass through registered tools with declared footprints; notifications must be consumed before the next action; and the agent must correctly judge and repair premise conflicts. Its reported results belong to the evaluated workloads and models, not to every agent system. Irreversible actions still require stricter treatment, and undeclared reads make any dependency protocol blind.

My narrower conclusion does not depend on adopting MTPO wholesale. Even a conservative runtime benefits from making premise invalidation explicit. It can pause instead of self-heal, require human review instead of compensation, or serialize high-risk effects. The ledger remains useful because it tells the runtime what became unsafe and why.

Concurrency is a dependency problem

Parallelism is easy to demonstrate: launch more agents and show several terminals moving at once.

Correct concurrency is harder. It requires preserving the relationship between what an agent observed and what it later tried to change. Worktrees protect files. Locks protect critical sections. Change sets protect review boundaries. None of them replaces that relationship.

I do not want a runtime that asks, “Did two agents write the same object?” I want one that can answer a stronger question:

Which planned effects are no longer justified by the state that originally justified them?

Once that question becomes a first-class artifact, parallel agents stop looking like independent chat sessions. They start looking like a concurrent system we can validate, repair, and trust within explicit boundaries.

Sources

FACET AI CLI Terminal
facet@ai:~$