Getting Up to Speed on Multi-Agent Systems, Wave 3.6: Contracts, Runtime Monitors, and Formal Specs for Agents

06 Dec 2026

Open a production agent codebase and look at what sits directly downstream of an LLM call. You’ll almost always find a check — a JSON parser, a Pydantic schema, a non-empty assertion — and it’s easy to assume the boundary is guarded.

In When Code Becomes an LLM Call (Weng et al., Oct 2026 preprint), researchers audited 496 LLM call sites across 40 open-source agentic systems (13.4 million lines of code) and found the opposite. Nearly half (48%) of LLM outputs directly drove program control flow or execution, and 73% of those ran with zero human review. Programs structurally enforced 78% of code-side constraints, yet left 67% of prompt-side constraints as bare natural-language requests. Most revealing was what the authors call the Post-Condition Illusion: 82% of call sites ran some post-check, yet 63% of expected constraints went unmet and only 5.3% satisfied their full contract. Agreement across independent raters who didn’t see the surrounding code was ≥0.95, and minimal code-enforcement patches blocked every evaluated runtime exploit trigger.

That 5.3% number is why runtime enforcement split off from offline evaluation in 2026 and became its own formal-methods and systems track. If you can’t rely on prompt wording or partial JSON parsing at the call site, what can runtime monitors, temporal contracts, type-and-effect systems, and staged commit contracts actually guarantee over probabilistic agents — and where does each layer stop?

Seven core 2026 systems, bracketed by three boundary results, map out that runtime stack: decoupling the event bus, running temporal specs over traces, testing why probabilistic approval quorums collapse without deterministic rules, and pushing verification down to staged persistent state and mechanized capability calculi.

Call-Site Checks and Decoupling the Event Bus

Minimal code checks at a single LLM call site close raw parser exploits, as Weng et al. showed, but the moment you monitor multi-step tool sequences you hit a plumbing problem: agent frameworks like LangGraph, MCP, and A2A interleave proposals, retries, and completed tool calls in ways that easily corrupt naive stateful monitors.

Think about what happens if a monitor watches a stream of tool requests and blocks an unauthorized delete_record call. What should the monitor’s own state machine record? If it advances its automaton as though the deletion happened, a single rejected proposal permanently poisons every downstream temporal check.

AgenticRV (Angelo Ferrando, Oct 2026 preprint) handles that seam directly with a formalism-agnostic runtime-verification bus that decouples framework event adapters from heterogeneous monitors. AgenticRV explicitly separates rejected execution attempts from completed effects on the event stream so blocked tool requests don’t corrupt monitor state. On an Apple M3 Pro running LangGraph, the bus itself is cheap: +413.6 μs for first-monitor dispatch (1.333 ms for a full guarded call), +868.8 μs across 8 monitors, and 76–86 μs for JSONL audit logging — and blocking a call is 144.2 μs faster than letting it through.

Microsecond bus overhead takes the “runtime verification is too slow” excuse off the table. It doesn’t tell you what specification language to run on that bus, or whether the specification sees ground truth.

Temporal Logic Over Dialogue and Tool Traces

Once you have a clean event stream, two 2026 monitors bring classic runtime verification (first-order temporal logic and finite automata) onto agent traces, coming at the grounding problem from opposite ends.

DejaVuGuard (Cohen, Havelund, Omer, and Peled, RV 2026, Springer LNCS) runs an inline two-phase monitor over conversational policies. First, a local grounding LLM (Ministral-3-8B) extracts structured predicates, entity IDs, and quantities from natural-language turns; then an extended DejaVu symbolic engine evaluates first-order past-time Quantified Temporal Logic (QTL) policies using binary decision diagrams (BDDs). Across 500 scripted conversations (3,669 messages) spanning five policy families, DejaVuGuard reached 90.5% scenario accuracy and 98.6% per-message verdict accuracy (the Springer LNCS proceedings are paywalled, so I couldn’t check latency tables). The architectural trade-off is right on the surface: the BDD engine is symbolically exact only over the grounded event stream. Whenever the local grounding LLM mis-extracts a predicate or entity ID, the formal engine faithfully verifies the wrong fact.

ContrAgent (Xiao, Liu, and Nuzzo, UC Berkeley and Sponsio Labs, Sep/Nov 2026 preprint) skips natural-language grounding by targeting fixed tool-call predicates directly. It compiles model-independent LTLf assume-guarantee contracts into deterministic finite automata (DFAs) that gate tool invocations online in milliseconds and audit traces offline across SOPBench, AgentDojo, R-Judge, and τ²-bench. On R-Judge, ContrAgent achieved 91.8% F1 (97.0% precision, 87.0% recall), beating both GPT-4o (74.4% F1) and the human baseline (~89%).

Both monitors beat free-form LLM judges because the temporal decision procedure is deterministic once events are typed. Both share the same hard ceiling, too: they inspect dialogue turns or tool-call requests, not the persistent state those tools actually mutate. A tool call whose arguments match the DFA contract can still trigger an unexpected write inside a backend database or an undocumented side effect downstream.

Why Voting LLM Monitors Collapse Under Correlated Attacks

When policies don’t fit neatly into fixed tool predicates, teams often try what sounds like a sensible fallback: put an ensemble of LLM approval monitors in front of sensitive actions and require a quorum vote.

Correlated Failures of AI Approval Monitors (Luca Zanolini, Oct 2026 preprint) applies distributed-systems fail-prone systems theory to show why vote-counting across LLM approvers is false comfort. Zanolini evaluated payment approval across 12 small open-weights monitors (under two pre-registered protocols), alongside three non-pre-registered frontier models (Claude Opus 5.5, GPT-6 Astra, Gemini 4 Argon) and DeepSeek-V3.2.

Aggregating by independent evidence sources blocked only 0.9% of legitimate payments versus 7.4% for vote-counting — roughly 8x fewer false blocks at matched safety. More importantly, under the pre-registered worst-case attack, all 12 approvers collapsed onto one shared misleading source: no aggregation rule over the 12 LLM monitors survived every measured attack. Twelve persuadable models reading the same spoofed input are one failure domain, not twelve. Adding an unpersuadable deterministic rule engine restored both safety and liveness across the measured attacks.

Zabolotnii’s Trust Is Not a Score (Sep 2026 preprint) makes a complementary point, arguing for non-compensatory fail-closed gates over weighted risk scores: if a single hard invariant fails, high confidence on three other dimensions shouldn’t average it back into an approval. Together, Zanolini and Zabolotnii draw a clear boundary: LLM judges can triage ambiguous signals, but safety gates need independent evidence channels and deterministic fail-closed rules that prompt content can’t talk past.

Effect Commit Contracts and Mechanized Capability Calculi

Even a deterministic DFA or an unpersuadable approval rule engine still only checks what the agent proposed to do, not what actually changed in persistent state. The next step moves verification down to the staged database commit — and to mechanized proofs over the capability plumbing itself.

EffectMatch (Zhang, Zhang, Liang, Yan, Zuo, and Wang, Harbin Institute of Technology, Sep 2026 preprint) enforces Effect Commit Contracts over real database writes. In PostgreSQL, EffectMatch locks registered relations, attaches write-recording triggers, and executes agent tool calls inside a rollback-capable candidate transaction. Before committing, it diffs the actual persistent row writes against an approved outcome specification bound to single-use permits; any unapproved write or missing required write rolls back the transaction and halts continuation. Across 206 public database and business tasks (MCPMark plus shopping, support, and travel domains), EffectMatch preserved 100% of clean runs and blocked 100% of tested unapproved commits (alongside 120 ablation runs and 80 workflow-topology handoff cases).

EffectMatch crosses a line that tool-call monitors like ContrAgent can’t. Even if a buggy tool wrapper or multi-step SQL sequence tries to mutate an extra table, the candidate-transaction diff sees the real persistent write and rolls it back before commit. Its limits are just as concrete: it requires a transactionally stageable backend like PostgreSQL, locking registered relations creates contention under concurrent multi-agent fleets, and non-transactional external side effects (webhooks, emails, payment rails) still sit outside the database transaction boundary.

At the static-verification end, Hard-KLAIM (Aldinucci, Bracciali, Colonnelli, Medić, Mulone, Roversi, and Santimaria, JLAMP, Elsevier, 2026/2027) extends the KLAIM process calculus with a locality-aware type-and-effect system for MCP workflows split into three phases (proposal → commitment → execution). The authors mechanize trace-safety proofs — provenance and authority confinement, capability non-amplification, and boundary fidelity — in Rocq (JANJI-ROCQ). It’s a purely formal, paywalled journal paper with zero runtime benchmarks, and by design it’s blind to whatever happens inside the LLM’s weights; what it buys is machine-checked assurance that the plumbing between localities can’t silently amplify authority.

Two companion preprints show the cost of tightening formal harnesses in practice:

  • In Call-Level Revision Contracts (Jiang et al., Nov 2026 preprint), the authors prove an impossibility result for plan edits: no local call identity can be both relocation-invariant and immune to wrong reuse when a multi-step plan is revised, so contract bindings over cached calls need structural context rather than local IDs.
  • In L3M (Eisenach et al., Oct 2026 preprint), a Lean 4 formal harness enforcing undo ceilings and sealed self-extensions measured the capability tax of tight containment directly: ~27.0% pass@3 on 37 Terminal-Bench tasks versus ~41.7%–43.2% for an unrestricted unsafe shell.

Where Each Contract Layer Holds and Stops

System What It Enforces Over Key Verified Evidence Where Enforcement Stops
Call-Site Audit Code–LLM boundary in OSS agents 496 sites / 40 repos (13.4M LOC): 82% have some check, only 5.3% meet full contract Diagnostic audit + minimal patches on evaluated triggers, not a universal runtime
AgenticRV Framework event bus (LangGraph/MCP/A2A) Separates rejected attempts from effects; +413.6 μs first monitor, 1.333 ms guarded call Transport/event decoupling only; semantic guarantees depend on attached monitors
DejaVuGuard (RV '26) Dialogue turns via local LLM + QTL BDDs 500 scripts / 3,669 msgs: 90.5% scenario acc, 98.6% message verdict acc Paywalled (no latency data checked); grounding LLM errors break end-to-end soundness; no DB view
ContrAgent Tool-call traces via LTLf DFAs R-Judge 91.8% F1 (97.0% precision, 87.0% recall), beating GPT-4o (74.4%) and humans (~89%) Bounded by predicate vocabulary; checks tool requests, not hidden backend writes
AI Approval Monitors (Zanolini) & Trust Is Not a Score Multi-monitor approval quorums & fail-closed gates Independent sources cut false blocks 7.4% → 0.9%; pure-LLM quorum failed worst-case attack; deterministic rule engine + non-compensatory gates restore safety Deterministic rules only cover invariants expressible over structured fields
EffectMatch Staged PostgreSQL persistent state 206 DB/business tasks: 100% clean preserved, 100% tested unapproved commits blocked Needs transactional DB; relation locks add contention; external webhooks/emails stay outside; plan edits hit revision-contract reuse limits
Hard-KLAIM (JLAMP) Typed MCP proposal/commit/exec calculus Rocq-mechanized confinement, non-amplification, and boundary-fidelity proofs Purely formal (no runtime benchmarks); blind to internal LLM reasoning; strict formal harnesses carry capability taxes (e.g., L3M ~27.0% vs. ~41.7%–43.2%)

Contracts and runtime monitors assume the agent is cooperating with your specification boundary — or that your predicate extractor, rule engine, and transaction boundary see every channel the agent can touch. Once untrusted external content enters the context window, or an attacker deliberately confuses the model into exfiltrating secrets through authorized tool calls, monitoring cooperative specifications stops working. You have to move security enforcement completely out of the model and onto the execution boundary.

That’s where Wave 3.7 goes next: intent-scoped capabilities, information-flow control, transactional OS confinement, and the poisoned-memory wall.