Back to AI Research

AI Research

Grow the Harness, Not the Context: From Strategy-Fr... | AI Research

Key Takeaways

  • Large language model (LLM) agents often perform repetitive tasks, yet they typically rely on the model to "re-think" the same control decisions—such as how t...
  • Large language model (LLM) agents often handle streams of related tasks, yet standard harnesses repeatedly ask the model to reconstruct the same control decisions inside each task's context.
  • We study whether task feedback can instead turn recurring control into reusable executable code, while reserving LLM calls for task-specific semantic reasoning.
  • We introduce Growing Harness, a failure-guided training paradigm that learns the agent harness itself from a strategy-free scaffold that exposes fixed model and tool interfaces but encodes no task-solving controller.
  • Accepted edits accumulate in one shared harness, allowing its control structure to emerge from task feedback.
Paper AbstractExpand

Large language model (LLM) agents often handle streams of related tasks, yet standard harnesses repeatedly ask the model to reconstruct the same control decisions inside each task's context. We study whether task feedback can instead turn recurring control into reusable executable code, while reserving LLM calls for task-specific semantic reasoning. We introduce Growing Harness, a failure-guided training paradigm that learns the agent harness itself from a strategy-free scaffold that exposes fixed model and tool interfaces but encodes no task-solving controller. Function-level execution traces localize each failure to a bounded code surface, an optimizer repairs a window of failures jointly, and a success-first held-out gate rolls back repair sequences that harm prior capability. Accepted edits accumulate in one shared harness, allowing its control structure to emerge from task feedback. Across BrowseComp-Plus and WebArena-Verified with three deployment models from 4B to 120B parameters, Growing Harness achieves the highest mean success in five of six benchmark-model settings and trails the best mean by 0.7 pp. in the sixth. Relative to a Tool-Calling agent, it reduces LLM calls by 76.0-91.8% and deployed-agent inference cost by 74.4-98.6%. On WebArena-Verified, its success remains 44.7-45.3% across model scales, whereas Tool-Calling falls to 6.7% with the 4B model. Ablations show that trace-local edits, joint repair, and gate-based rollback each improve final success. These results show that persistent program growth can move recurring control out of model context and into low-cost code, yielding reusable specialist agents that remain effective with smaller deployment models.

Large language model (LLM) agents often perform repetitive tasks, yet they typically rely on the model to "re-think" the same control decisions—such as how to filter data, verify progress, or handle errors—every single time. This approach is inefficient, as it consumes expensive inference calls and clutters the model's context window. This paper introduces "Growing Harness," a new training paradigm that shifts this recurring control logic out of the LLM and into reusable, executable code. By doing so, the agent reserves the LLM's reasoning power for complex, task-specific semantic judgments while using low-cost code to handle routine operations.

From Scaffold to Specialist

The process begins with a "strategy-free scaffold." Unlike traditional agents that come with a pre-built, rigid control loop, this scaffold is a minimal shell that provides the necessary interfaces for tools and the LLM but contains no built-in strategy for solving tasks. As the agent encounters failures during its work, the system uses these failures as feedback to grow the harness. Instead of just fixing a single error, the system synthesizes new, reusable code that becomes a permanent part of the agent’s "harness," allowing it to handle similar future tasks more efficiently. The ai agents story also surfaces in Google AI Introduces EnvHarness for Adaptive..., adding another angle.

How the Harness Grows

The system employs a failure-guided approach to ensure the agent improves without becoming brittle. When the agent fails, it generates a "function-level execution trace" that pinpoints exactly which part of the code caused the issue. An optimizer then repairs this specific area of the code rather than trying to rewrite the entire program. To prevent the agent from "forgetting" how to perform previous tasks or developing bad habits, the system uses a "success-first held-out gate." This acts as a safety check: if a new code edit harms the agent's performance on a set of held-out validation tasks, the system automatically rolls back the changes, ensuring that only beneficial, stable improvements are kept.

Efficiency and Performance

The results demonstrate that this method significantly reduces the cost of running agents. By moving recurring control logic into code, the Growing Harness reduces the number of LLM calls by 76.0–91.8% and cuts inference costs by 74.4–98.6% compared to traditional tool-calling agents. Notably, this approach remains highly effective even when using smaller, less powerful models (such as 4B parameter models), which typically struggle with complex agentic tasks. While traditional agents see their success rates plummet when model scale is reduced, the Growing Harness maintains consistent performance, making it a promising solution for resource-constrained environments like mobile devices. The ai agents story also surfaces in Arm unveils AI-native mobile platform for..., adding another angle.

Key Takeaways

The research highlights that agentic behavior can be treated as a growing program rather than a series of isolated inference events. By focusing on trace-local edits—where only the faulty parts of the code are updated—and protecting the system with gate-based rollbacks, the agent evolves into a specialized tool. This architecture effectively separates "thinking" (semantic reasoning handled by the LLM) from "doing" (routine control handled by the harness), providing a scalable path for building more efficient and capable AI agents. The ai agents story also surfaces in Andrew Ng Launches OpenWorker to Deliver..., adding another angle. as detailed in the full paper on Arxiv

Comments (0)

No comments yet

Be the first to share your thoughts!