Manuscript Offprint

arXiv:2610.19843

LAGO: Language Agents with Reusable Growing Options

Yuran Wu, Mengkang Hu, Qionglin Qiu, Fanqing Meng, Qiguang Chen, Yuhang Zhou, Qiudan Zhang, Xu Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Long-horizon tasks expose a weakness of monolithic tool-use loops: one agent must decompose, execute, and verify a task within a single trajectory. We introduce LAGO, which treats specialized language agents as reusable temporally extended options. A meta-agent retrieves options from a persistent library or spawns new ones, dispatches sub-tasks, verifies results, and admits successful novel options. The library grows across tasks without updating model weights. On 500 SWE-bench Verified tasks, frozen Qwen3.5-35B-A3B in both roles resolves 58.6% under single-attempt evaluation with the official Docker evaluator. On a fixed 150-task subset, we re-run mini-SWE-agent, Terminus 2, and LAGO with the same policy, temperature, task IDs, and evaluator; their resolve rates are 49.3%, 57.3%, and 60.3%, respectively. Cross-model experiments provide evidence consistent with a role for decomposition quality. A 50-task component ablation finds four fewer resolved tasks without decomposition, two fewer with shuffled reused content, and six fewer without the library. These results support reusable agent-options as a practical abstraction for task streams, while leaving component-level causality task-and model-dependent.

1 Introduction

Large language model agents have become a common interface for solving complex tasks with tools such as code execution, file editing, and web search. A dominant design pattern is the ReAct-style loop (Yao et al., 2023b), where a single agent repeatedly reasons, executes a tool action, observes the result, and continues until the task is completed. This design is simple and general, but it becomes brittle as task complexity increases. For realistic software engineering problems, an agent may need to understand a large repository, localize a bug across multiple files, implement a patch, run tests, and verify that no regression has been introduced. In such settings, a monolithic agent must simultaneously perform task decomposition, context retrieval, execution, verification, and recovery from errors. This often leads to context overflow, diluted attention over irrelevant observations, and error accumulation over long action trajectories.

A natural remedy is to hand-design a multi-agent pipeline. For example, different agents may be assigned specialized roles such as planner, coder, tester, reviewer, or researcher. Such systems can reduce the burden on any single agent by decomposing a complex task into smaller pieces. However, most existing multi-agent systems remain largely static: the roles, prompts, and interaction patterns are manually specified before execution. The system does not automatically acquire reusable capabilities from previous successful tasks. As a result, recurring sub-problems are repeatedly solved from scratch rather than being stored, verified, and reused.

∗^{*}Equal contribution.

†^{\dagger}Corresponding author: wangxu@szu.edu.cn

We study how a language-agent system can acquire and reuse specialized capabilities across tasks. The system must decide when to reuse an existing agent, when to spawn a new one, how to verify and admit it into a persistent library, and how to limit redundancy.

We propose LAGO, a meta-agent framework that treats specialized language agents as temporally extended actions, or options. In hierarchical reinforcement learning, an option is a closed-loop policy that runs for multiple steps until a termination condition is met (Sutton et al., 1999; Bacon et al., 2017). We adapt this abstraction to language agents. Each agent-option encapsulates a role specification, an intra-option policy implemented by an LLM-tool loop, a termination condition, and a verifier. The meta-agent operates over a growing action space consisting of primitive tools and reusable agent-options. During a task stream, it can retrieve existing options, spawn new ones when necessary, evaluate their outcomes, and maintain the library through admission and deduplication.

For complex agent tasks, performance may depend on the quality of the meta-agent's decomposition as well as the executor's capability. A strong executor can still fail when a task is split into overlapping, underspecified, or unverifiable sub-tasks. Better decompositions may help the same executor by isolating concerns, reducing context pressure, and enforcing verification.

We evaluate LAGO primarily on SWE-bench Verified with a single frozen Qwen3.5-35B-A3B model in both roles, single-attempt sampling at temperature 0, and the official Docker evaluator. On the full 500-task split LAGO resolves 58.6% of issues. Since the weights are frozen, this measures the delivered scaffold under a fixed backbone rather than separating framework and model effects. Published SWE-bench numbers are difficult to compare across papers—the same backbone spans 25% to 62% with different scaffolds and context budgets—so we re-run mini-SWE-agent and Terminus 2 end-to-end on the same frozen policy, 150-task subset, and temperature. We also hold the executor fixed while varying the meta-agent on SWE-bench Pro and BrowseComp, and measure library reuse in a separate rollout.

Our contributions are listed as follows:

• We formulate specialized language agents as options, enabling a meta-agent to invoke temporally extended agent behaviors rather than only primitive tool calls.

• We introduce a growing agent-option library with spawn, admission, reuse, and deduplication mechanisms, allowing the effective action space to evolve over a task stream.

• We evaluate LAGO on SWE-bench Verified with a frozen Qwen3.5-35B-A3B as both meta-agent and executor under a single-attempt, temperature-0, official-Docker protocol: 58.6% on the full 500-task split for absolute level, plus a controlled comparison in which two competing scaffolds are re-run end-to-end on the same frozen policy and the same 150-task subset. A supplementary cross-model analysis tests whether the observed differences are consistent with decomposition quality by holding the executor fixed and varying only the meta-agent.

References (31)