Subagents vs Agent Skills: Executing Reusable Knowledge for Long-Horizon Agentic Tasks

Wasu Top Piriyakulkij, Rachel Lawrence, Alicia Curth, Sushrut Karmalkar, Niranjani PrasadarXiv 2026

TL;DR

When LLM agents tackle long, complex tasks, dumping "skill instructions" directly into their main context window causes context bloat and degrades reasoning. This paper demonstrates that executing reusable skills as isolated subagents with fresh context windows significantly improves performance on long-horizon tasks. However, this approach only succeeds if the skills are structured with explicit natural-language input-output contracts, trading higher total token costs for reduced peak context length.

What Problem Does This Paper Address?

As large language model (LLM) agents are deployed to solve increasingly complex, long-horizon tasks, they need access to domain-specific knowledge. The current state-of-the-art approach relies on "agent skills"—reusable packages containing instructions, scripts, and documentation. Typically, when an agent decides to use a skill, the system loads the entire skill recipe directly into the agent's main context window.

However, as a task drags on, this approach suffers from severe context bloat. LLM reasoning capabilities notoriously degrade as context windows grow (the "lost in the middle" effect). The authors address a fundamental architectural question: How should reusable knowledge be executed? Is it better to reason inline within a single monolithic context window, or delegate subtasks to independent context windows?

Figure 1: Two type of skill package execution: agent skill vs subagent. While agent-skill execution does all the reasoning in a single context, subagent execution creates new context windows for each subtasks, each window initialized with skill instructions (SKILL.md). Since subagents reason within their own context, however, extra tokens are needed for the main agent and subagents to communicate.

Methods

The authors compare two distinct execution paradigms for skill packages:

  1. Agent Skill Execution (Inline): The main agent reads the skill instructions directly into its own context and executes the steps itself.
  2. Subagent Execution (Isolated): The system spawns a completely fresh context window initialized with the skill's instructions. The subagent independently runs its own tool-calling loop and returns only its final answer to the main agent, hiding its internal reasoning steps.

To make subagent execution effective, the authors introduce Input-Output Contracts for skills, drawing inspiration from the options framework in reinforcement learning. Instead of loose, unstructured descriptions, an effective subagent skill package explicitly defines:

  • A concise summary of the skill's purpose.
  • Input contracts ($q_{in}$): Natural-language specifications of what data must be supplied.
  • Output contracts ($q_{out}$): Constraints on what the subagent must return upon completion.

Datasets

The authors evaluate their approach using SkillsBench, a benchmark containing 87 long-horizon agentic tasks across diverse domains.

Because the original human-authored skill packages in SkillsBench rarely specify explicit inputs or outputs, the authors introduced a new Synthesized Set. Using successful task trajectories from GPT-5.3 Codex and a Copilot CLI, they programmatically generated well-interfaced, contract-driven procedural skill packages for 64 of the SkillsBench tasks.

Key Insights and Ideas

  • Information Encapsulation Matters: Subagents act as a mechanism for enforcing modularity. By hiding a subtask's verbose intermediate reasoning and tool outputs from the parent agent, the parent can maintain a cleaner, more effective reasoning state.
  • Peak Context vs. Total Tokens: LLM performance degradation is driven by the peak context length of any single window, not the total aggregate tokens processed across the entire system. Subagents successfully lower this peak length.
  • The Execution-Structure Alignment: The benefit of reusable knowledge depends entirely on how it is structured. Loose, declarative knowledge is better injected inline as an agent skill. Procedural, step-by-step knowledge is far more powerful when wrapped in a strict contract and handed to a subagent.

Key Results

  • Contract-Driven Success: On the original SkillsBench packages (lacking I/O contracts), inline agent skills matched or beat subagents. However, on the synthesized contract-driven packages, subagents significantly outperformed inline execution across almost all models, with the largest gains seen in smaller, more bandwidth-limited models like Qwen3.5-9B and Gemma-4-12B.
Figure 2: Average task accuracy on SkillsBench for each execution mode (agent skill / subagent) and skill package set, across base LLM models. The no I/O contracts packages are the human-authored ones curated with SkillsBench, which describe relevant knowledge but rarely specify a skill’s expected inputs or outputs. The procedural + I/O contracts packages are ours, synthesized from successful trajectories to give procedural instructions with explicit input-output contracts.
  • Graceful Scaling under Pressure: When the authors intentionally flooded the context with "distracting tools" to simulate tool-rich environments, subagent performance degraded much more gracefully than inline agent skills.
  • The Token Trade-off: Subagents successfully reduced peak context length in over 80% of tasks for stronger models (like GPT-5.3 Codex and Kimi-K2.6). The catch? Subagent execution consumes substantially more total tokens due to the communication overhead of duplicating necessary setup information across separate context windows.
Figure 4: Left: The percentage of tasks whose peak context length used is lower for subagent execution than agent skill execution. Right: Total token used by each execution mode for each LLM model. The skill packages used are from our synthesized set for both left and right figures.

Limitations and Future Work

The primary limitation of the subagent approach is its communication overhead. Because subagents cannot see the main context, the parent agent must spend extra tokens explicitly passing all relevant information, leading to data duplication and higher API costs.

Additionally, subagents introduce a new point of failure: subtask delegation. If the parent agent fails to understand the contract or passes insufficient information, the subagent will fail.

The authors suggest two promising directions for future research:

  1. Designing methods for more token-efficient communication between parent and subagents.
  2. Exploring skill-library refactoring—borrowing principles from software engineering to automatically abstract, factor, and hierarchically organize massive libraries of thousands of AI skills.

Summary updated

BibTeX
@misc{piriyakulkij2026subagents,
  author = {Wasu Top Piriyakulkij and Rachel Lawrence and Alicia Curth and Sushrut Karmalkar and Niranjani Prasad},
  title = {{Subagents vs Agent Skills: Executing Reusable Knowledge for Long-Horizon Agentic Tasks}},
  year = {2026},
  eprint = {2609.09233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.09233},
}
Figure