Capability Sheaves for Compositional Agent-Harness Repair: Controlled Quotients and a Real-Repository Stress Test introduces a mathematical framework using sheaf theory to diagnose and repair failures in AI agent harnesses. The research addresses the common issue where individual components of an agent—such as retrieval, routing, and verification—function correctly in isolation but fail to produce a coherent, executable result when combined.
Modeling Agent Failures as Sheaves
The paper models an agent harness as a "capability sheaf," where different requirements (localization, contract, ordering, preservation, and verification) are assigned to vertices in a graph. Each vertex contains a "stalk" of typed behavior signatures, and restriction maps define how these components share information.
A candidate harness is considered successful only if it satisfies a global section—a set of local behaviors that agree on all shared fields. The author uses an exact constraint-satisfaction problem (CSP) to define this feasibility and employs linearized relative cohomology as a diagnostic tool to identify where components fail to "glue" together.
Controlled Experiments and Quotienting
To test the method, the author conducted a controlled experiment involving 20 task clusters. The study introduced "hidden interior mediators"—nuisance variables that complicate the state of the system. By applying a quotient to these mediators, the researcher was able to remove the influence of these variables, reducing the candidate search budget from 2,000 to 1,000 per cluster.
The results showed that the quotienting method successfully aligned with the exact CSP, confirming that the approach provides invariance to stale representatives. However, the author notes that this does not prove the method is superior to exact reasoning; rather, it demonstrates that the cohomological approach can effectively handle hidden state complexity.
Real-Repository Stress Test
The method was further evaluated on a discovery split from the SWE-bench Multilingual pool of PatchFuseBench, covering 160 issues across 20 repositories. The study tested 875 candidate patches and 2,579 edit atoms.
The findings indicate that while the cohomological approach was nontrivial on 848 of the 875 candidates, it did not provide a statistically significant advantage over noncohomological selectors. Specifically, the repair method resolved 118 issues compared to 116 for the baseline, a difference that was not supported across repositories (p=0.75). A "leave-one-repository-out" test resulted in the method tying with the baseline anchor.
Limitations and Conclusions
The author concludes that while the study supports the proposed controlled invariance mechanism and an identifiability correction, it does not demonstrate a real-world cohomological advantage for patch repair. The paper explicitly states that the discovery gate failed and the confirmatory split remains sealed. The research serves as a boundary marker for the method, showing that while the mathematical framework is sound for diagnosing local-to-global failures, it does not currently outperform standard exact search methods in real-world repository repair tasks.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!