TL;DR
The Causal Improvement Graph (CIG) is a new framework for automatically optimizing "agentic harnesses"—the runtimes that govern how LLMs interact with tools and context. By externalizing the experimental history into a structured graph of evidence, hypotheses, and outcomes, CIG relieves the LLM proposer of the burden of tracking complex histories, leading to more systematic and effective agent performance gains.
What Problem Does This Paper Address?
Building a great AI agent isn't just about the underlying model; it’s about the Harness. A harness is the programmable runtime that constructs the prompt context, manages tool calls, and coordinates execution flow. Optimizing this harness is currently a manual, engineering-heavy process.
While researchers have tried to automate this using "meta-harness" loops—where an LLM proposer looks at past execution traces and suggests code revisions—they hit a scaling wall. As the history of experiments grows, the LLM struggles to keep track of what it has already tried, why certain changes failed, and how new evidence contradicts old assumptions. This "reconstruction burden" leads to inefficient proposals and stalled progress.
Methods
The authors introduce the Causal Improvement Graph (CIG), which shifts the optimization process from being "proposer-centric" to "graph-governed." Instead of dumping raw logs into an LLM's context window, CIG maintains a persistent, evolving graph state.
The graph consists of four primary node types:
- EVIDENCE: Observed behaviors and their sources.
- HYPOTHESIS: Falsifiable explanations for why a behavior occurred.
- INTERVENTION: Specific, executable code changes designed to test a hypothesis.
- OUTCOME: The measured results and verdicts of an intervention.
The discovery loop follows a structured sequence: Observe $\rightarrow$ Plan $\rightarrow$ PlanSelect $\rightarrow$ Implement $\rightarrow$ Evaluate $\rightarrow$ Update. Crucially, the Update step doesn't just append new data; it revises the assessments of existing hypotheses. If a new outcome contradicts a previous theory, the graph reflects this change, ensuring that subsequent planning is guided by the most up-to-date "understanding" of the system.
Datasets
The authors evaluated CIG across a diverse set of benchmarks to ensure robustness:
- Classification Tasks: USPTO-50k (chemical reactions), Symptom2Disease (medical diagnosis), and LawBench (legal charge classification).
- Agentic/Coding Tasks: SWE-bench Verified (resolving real-world GitHub issues), AppWorld (interacting with stateful APIs), and Terminal-Bench (command-line interface tasks).
Key Insights and Ideas
- Externalizing the "Improvement State": By moving the logic of experimental history out of the LLM's prompt and into a graph, the system can handle much longer optimization trajectories without losing focus.
- Falsifiability as a First-Class Citizen: CIG requires hypotheses to state what results would contradict them. This prevents the agent from falling into "confirmation bias" where it interprets every small score increase as proof that its complex theory was correct.
- Decoupled Operations: The LLM is only invoked for "locally scoped" tasks (e.g., "Given this evidence, suggest a hypothesis"). It doesn't need to "own" the entire optimization strategy, which makes the process more robust to different model choices.
- Revision vs. Accumulation: Most systems just pile up logs. CIG actively revises its state. An unsuccessful experiment is seen as a valuable data point that narrows the supported scope of a hypothesis, rather than just a "failed run" to be ignored.
Key Results
CIG consistently outperformed existing meta-harness baselines (like Meta-Harness and HarnessFix) across all tested environments.
- Performance Gains: On SWE-bench Verified, CIG achieved a test pass rate of up to 65.6%, significantly higher than the "Full History" baseline.
- Robustness: The framework proved effective regardless of which LLM was used as the "solver" (the agent doing the task) or the "proposer" (the agent optimizing the harness).
- Efficiency: In a budget-matched comparison, CIG reached higher performance levels using the same number of proposer tokens as traditional methods, proving that how computation is organized matters as much as how much is used.
Limitations and Future Work
While CIG shows strong results within individual optimization searches, the authors note a few areas for future exploration:
- Cross-Task Transfer: Currently, the graph is built from scratch for each task. A promising direction is investigating how a persistent improvement state could be transferred or adapted across different tasks or models.
- Graph Complexity: As the number of iterations increases, the graph itself could become large. Managing the "Observe" step's context window for very large graphs remains a technical challenge.
- Human-in-the-loop: The paper focuses on fully automated optimization, but the structured nature of CIG makes it highly interpretable, suggesting it could be a powerful tool for human engineers to collaborate with optimization agents.
Summary updated