arXiv:2605.15425cs.SEcs.AI2026-05

让AI写代码更稳:通过动态拆解任务,只重跑失败部分。

Runtime-Structured Task Decomposition for Agentic Coding Systems

论文配图:Runtime-Structured Task Decomposition for Agentic Coding Systems
图 1 · 摘自论文原文
  • 任务拆分和流程由可执行逻辑控制,而非固定提示词。
  • 关键任务重试成本降低51.7%,调试效率显著提升。
  • 适合需要高可靠性、易调试的智能编程系统开发者。

智能编程系统广泛使用大语言模型(LLMs)进行调试、根因分析和代码审查等任务。然而,现有系统将任务逻辑、执行流程和输出生成都嵌入单一提示词中,导致行为脆弱、难以调试且重试成本高。本文提出运行时结构化任务分解方法,通过可执行控制逻辑管理任务划分与执行流程,仅让LLM处理特定判断任务,并在下游执行前验证输出是否符合预定义模式。我们在两个软件工程任务上评估三种配置:单体执行、静态分解(固定子任务、无运行时分支)和运行时结构化分解。每种配置运行10次。结果表明,单纯分解并不减少重试成本:在Kubernetes根因分析任务中,静态分解的重试成本为1,632±145 tokens,高于单体基线的904±17 tokens,因失败需重跑下游子任务;多文件调试任务中,静态基线消耗933 tokens,而单体系统为703 tokens。运行时结构化方法仅重跑失败子任务,将根因分析重试成本降至436±132 tokens,调试任务为460 tokens。总体而言,该方法相比单体系统降低51.7%重试成本,相比静态分解降低73.2%,显著提升效率、可调试性与系统可靠性。

原文摘要 · Abstract (English)

Agentic coding systems increasingly use large language models (LLMs) for software engineering tasks such as debugging, root cause analysis, and code review. However, many existing systems encode task logic, execution flow, and output generation inside monolithic prompts. This design creates brittle behavior, limited debuggability, and high retry costs because failures often require rerunning the full workflow. We present runtime-structured task decomposition, an architectural approach in which task partitioning and execution flow are managed through executable control logic rather than prompt structure alone. LLMs are used only for focused judgment tasks, and outputs are validated against predefined schemas before downstream execution. We evaluate this approach on two software engineering workloads using three configurations: monolithic execution, static decomposition with fixed subtasks and no runtime branching, and runtime-structured decomposition. Each configuration was evaluated across 10 runs. Our results show that decomposition alone does not necessarily reduce retry cost. In the Kubernetes root cause analysis workload, the static decomposition baseline produced a retry cost of 1,632 +/- 145 tokens versus 904 +/- 17 tokens for the monolithic baseline because failures forced reruns of downstream subtasks. A similar pattern appeared in the multi-file debugging workload, where the static baseline consumed 933 tokens compared to 703 tokens for the monolithic system. The runtime-structured approach reran only failed subtasks, reducing retry costs to 436 +/- 132 tokens for root cause analysis and 460 tokens for debugging. Overall, the approach achieved up to 51.7% lower retry cost than monolithic systems and 73.2% lower retry cost than static decomposition baselines, improving efficiency, debuggability, and operational reliability in agentic coding systems.

智能编程任务分解大模型应用效率优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。