Locally Coherent, Globally Incoherent: Detecting Compositional Incoherence in Multi-Component LLM Agents
Abstract
Multi-component LLM agents can be locally coherent and globally incoherent: each tool, subagent, or routed model call satisfies its own probability constraints, yet the composed output can violate joint consistency. We formalize this failure mode using the compositional residual ε⋆, the L2 distance from the composed forecast to the joint coherent polytope. This quantity is a distribution-free certificate computable from the agent's output and the coupling constraints alone. A product-structure dichotomy characterizes when local coherence implies global coherence: under coordinate-selection aggregation, this holds if and only if the joint polytope factorizes as a Cartesian product of local polytopes. When coupling tightens this product, a hierarchical Boyle–Dykstra repair converges to the joint projection, yielding deterministic Brier improvement. The residual also supports online monitoring, repair, and stopping; an anytime-valid e-process over the residual stream provides uniform Type-I error control at any stopping time. Across 1,876 ensemble cliques from four contemporary LLMs, ε⋆ is positive on 33%–94% of cliques by relation type; hierarchical JCD reduces it to numerical precision.