Manuscript Offprint

arXiv:2610.10263

When Sub-Agents Work in Parallel: The Promises and Pitfalls of Dynamic Concurrency in Long-Horizon Coding Tasks

Han Li, HanHaoNing Li, Ziqian Jiang, Yiling Lou

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

HAN LI, Nanjing University, China

HANHAONING LI, Central University of Finance and Economics, China

ZIQIAN JIANG, Nanjing University, China

YILING LOU, University of Illinois at Urbana-Champaign, USA

As coding agents advance toward increasingly complex and long-horizon software development tasks, dynamic concurrency has emerged as a promising mechanism for scaling agent execution. Unlike predefined multi-agent workflows, dynamic concurrency allows a main agent to decide during execution whether, when, and how to spawn and coordinate concurrent sub-agents. However, its effectiveness, efficiency, and failure characteristics remain poorly understood, particularly for long-horizon coding tasks. In this work, we present the first systematic study of native dynamic concurrency in three frontier coding agents: Codex, Claude Code, and Kimi Code. We conduct controlled comparisons with dynamic concurrency enabled or disabled across 354 tasks from four long-horizon benchmarks and one bounded benchmark, yielding 2,124 executions and costing over $20K. Our results show that dynamic concurrency benefits most on long-horizon tasks, while bounded tasks often see little or negative improvement. Meanwhile, concurrency substantially increases resource consumption, with token usage reaching 1.41–3.31 times that of sequential execution. Through trajectory analysis, we develop a taxonomy of concurrency failure patterns comprising four main categories, 13 subcategories, and 28 specific patterns. Finally, we identify conditions under which concurrency provides concrete benefits, including complementary parallel work, alternative solution exploration, and independent validation. Together, our findings reveal both the promise and limitations of dynamic concurrency and provide empirical guidance for enabling more effective dynamic collaboration among multiple sub-agents.

CCS Concepts: • Software and its engineering → Software development techniques; • Computing methodologies → Multi-agent systems.

ACM Reference Format:

Han Li, HanHaoNing Li, Ziqian Jiang, and Yiling Lou. 2026. When Sub-Agents Work in Parallel: The Promises and Pitfalls of Dynamic Concurrency in Long-Horizon Coding Tasks.

1 Introduction

The recent advances of Large Language Models (LLMs) have enabled a remarkable progress in LLM-based coding agents [34, 62], which demonstrate increasingly strong capabilities across a broad range of critical software engineering tasks, from code generation [11] and debugging to repository-level issue resolution. As these agents are applied to increasingly complex and long-horizon tasks, however, a single agent often faces substantial limitations in its context, reasoning, and execution capacity. In particular, long-horizon software development may involve extensive code exploration, implementation, testing, and verification [5] over prolonged trajectories, motivating the need to scale agent execution beyond a single sequential trajectory [17, 63].

Multi-agent systems provide a promising path toward such scaling. By decomposing a complex task into subtasks and delegating them to multiple sub-agents, these approaches can increase execution capacity, enable parallel exploration of alternative solutions, and reduce end-to-end latency. Recent studies and agent systems have demonstrated the potential of multi-agent collaboration and parallel execution across a variety of complex reasoning and software engineering

Authors' Contact Information: Han Li, Nanjing University, China, 231220161@smail.nju.edu.cn; HanHaoNing Li, Central University of Finance and Economics, China; Ziqian Jiang, Nanjing University, China; Yiling Lou, University of Illinois at Urbana-Champaign, USA, yilingl@illinois.edu.

Han Li et al.

tasks [22, 29, 50, 59], suggesting that concurrency can serve as an important mechanism for scaling coding agents to more demanding workloads.

In fact, the earlier coding agents (e.g., TRAE [55] and OpenHands [58]) often adopt a static concurrency paradigm, which rely on predefined workflows and dedicated orchestration harnesses to coordinate the collaboration between sub-agents. For example, the number and roles of sub-agents, their task assignments, communication patterns, and synchronization points are often specified in advance for a particular workflow. While effective in well-structured settings, such a static concurrency requires developers to anticipate how a task should be decomposed and parallelized before execution. This rigidity makes it difficult to accommodate diverse and evolving tasks whose decomposition, dependencies, and opportunities for parallelism may become apparent only as execution unfolds, limiting the flexibility and generality of these approaches.

A recent trend among frontier coding agents is moving beyond such predefined parallel workflows toward dynamic concurrency. Rather than following a fixed orchestration, the main agent dynamically determines during execution whether, when, and how to spawn concurrent sub-agents based on the evolving task state. Figure 1 illustrates the dynamic concurrency in three frontier coding agents (e.g., Codex multiagent Version2 [49], Claude Code Dynamic Workflow [2], and Kimi Code AgentSwarm [45]). With dynamic concurrency enabled, a main agent dynamically constructs an execution plan to orchestrate sub-agents while remaining active to collect their results, reconcile shared interfaces or files, and verify the integrated artifact. Sub-agents are instantiated and executed on demand according to instructions issued by the main agent. For example, in Claude Code, the main agent automatically generates a workflow script that schedules parallel stages for multiple sub-agents, specifies their explicit dependencies, and coordinates their joins. Similarly, in Kimi Code, the main agent launches a batch of sub-agent contexts instantiated from a shared template with task-specific assignments, waits for their completion, and returns an ordered report. In Codex, the main agent supports both direct and nested delegation of sub-agents while continuing its own execution and exchanging messages with sub-agents.

While extensive efforts have evaluated coding agents and analyzed their failure patterns, existing studies have largely focused on either single-agent systems [3, 13, 25, 35, 66] or multi-agent systems organized around predefined collaboration protocols [10, 18, 22–24, 50, 56]. Moreover, existing evaluations predominantly target bounded coding tasks, such as SWE-bench [25, 60], where the expected outputs typically involve relatively small patches (e.g., only dozens of lines of code). In contrast, dynamic concurrency is particularly intended to support long-horizon and open-ended coding tasks, such as repository-level generation [17, 63, 67] and software release development [30], where the coding agents are expected to generate tens of thousands of lines of code per task. Therefore, it remains unclear how the emerging dynamic concurrency mechanisms in frontier coding agents affect their effectiveness and efficiency, particularly on long-horizon coding tasks.

To fill this knowledge gap, we perform the first study on the native dynamic concurrency mechanisms in frontier coding agents, including Codex multiagent Version2 [49], Claude Code Dynamic Workflow [2], and Kimi Code AgentSwarm [45]. In particular, we evaluate these coding agents with dynamic concurrency on a wide range of long-horizon coding tasks, including 226 repository generation tasks (e.g., RepoZero [67], ProgramBench [63], NL2Repo [17]) and 28 sustained repository evolution tasks (e.g., LoopsBench [30]). These long-horizon benchmarks span mean reference implementation or gold-change sizes of 0.8–54.4 thousand lines across different difficulty groups, providing broad implementation scopes for evaluating dynamic concurrency. To further enable a comparison between long-horizon coding tasks and bounded coding tasks, we also include 100 bounded coding tasks from the classic SWE-bench Verified [13]. In total, our evaluation yields 2,124 executions across a range of task complexities and execution horizons, with 11.2 billion recorded tokens corresponding to $20,780.02 at standard API rates.

Figure

Fig. 1. Overview of the dynamic concurrency mechanisms used by the three coding agents in our study.

Built upon the evaluation results, we perform both quantitative and qualitative to analyze the promises and failure patterns of coding agents with dynamic concurrency in long horizon-coding tasks. In (RQ1), we first systematically compare the effectiveness and efficiency of coding agents with dynamic concurrency or without dynamic concurrency (i.e., sequential mode). Interestingly, we find that dynamic concurrency does not consistently improve end-to-end task success rates, e.g., the resolution effects range from an 11.9 percentage point decrease to a 2.3 point increase, while mean token use reaches 1.41 to 3.31 times compared to the sequential mode. In particular, dynamic concurrency delivers pass rate gains on long-horizon benchmarks, especially LoopsBench, while providing no such gains on the bounded tasks (SWE-bench Verified). In (RQ2), we further analyze the delegation and coordination behavior within each task progresses. In particular, we observe that dynamic concurrency is increasingly extended in more challenging tasks, e.g., the number of created sub-agents increases along with the task difficulty. Besides quantitative analysis, we examine common failure patterns in dynamic concurrency (RQ3) and the mechanisms and conditions of observed benefits (RQ4). By manually annotating complete execution trajectories (Cohen's κ=0.77\kappa = 0.77 [15]), we develop a taxonomy with four main categories covering task orchestration, execution governance, global context management, and shared state and merge. These categories comprise 13 subcategories and 28 specific failure patterns. Moreover, we also find that dynamic concurrency brings benefits when sub-agents can complete complementary work, explore alternative solutions, or independently validate and correct implementation from the main agent.

In summary, we make the following contributions:

• Systematic Empirical Study. We systematically evaluate dynamic concurrency in frontier coding agents across long-horizon coding tasks, analyzing its effectiveness and efficiency, along with its sub-agent delegation and coordination behaviors.

• In-depth Failure Analysis. We analyze paired concurrent and sequential trajectories and construct a comprehensive taxonomy of failure patterns in dynamic concurrency.

Han Li et al.

  • Large-Scale Dataset. We release all 2,124 agent trajectories on long-horizon coding tasks with and without dynamic concurrency; moreover, the failure pattern annotations and analysis scripts are also released to support reproducible research on dynamic concurrency in coding agents.

References (33)