arXiv cs.AI· Jiahong Xiang, Kunqiu Chen, Lingming Zhang, Yuqun Zhang·· 13 小时前AI 评分42
Spine:将子任务树编译为结构化上下文,提升长程编程智能体表现
Spine: Compiling Subtask Trees into Structured Context for Long-Horizon Coding Agents
AI 导读
Spine 是一套接口与运行时,把子任务嵌套关系组织成持久树 SpineTree,并在每次模型调用前即时编译为上下文,保留未完成子任务的交互、用结果替换已完成子任务细节。
正文 · 原文
Abstract:Long-horizon coding tasks contain nested subtasks. Typically, agents record interactions sequentially into a growing history, causing context inflation and performance degradation. Compressing or trimming the history without explicit subtask boundaries can discard information needed by unfinished subtasks. Conversely, recursive subagent delegation isolates completed subtasks through child agents by assigning every subtask boundary to delegation, which conflates subtask granularity with executing agent choice, adding execution and coordination overhead. We introduce Spine, an interface and runtime that align model context with subtask nesting and completion. An agent declares explicit subtask boundaries through work scopes, allowing the same agent to execute nested subtasks inline while reserving delegation for independent parallel tasks. The runtime organizes execution in SpineTree, a persistent tree recording subtask relations, local interactions, completion states, and returned results. Before each model call, it compiles the tree into model context just in time, retaining unfinished subtasks' interactions and replacing completed subtasks' details with their results, while preserving prefix-cache reuse.
We integrate Spine into Codex to build SpineCodex. With GPT-5.6 Sol, compared with native Codex, SpineCodex improves SWE-Milestone Score by 11.8% while reducing total cost by 32.4%, improves the average ProgramBench test-pass rate by 17.3%, and improves Mean@5 on eight of the ten evaluated FrontierSWE tasks. On SWE-Milestone, it also achieves a comparable Score to Recursive Subagent at 73.7% lower total cost. We also integrate Spine into Pi through a reusable software package: with Gemini 3.8 Flash and Qwen 3.8 27B, it improves SWE-Milestone Score by 9.5-17.5% and the average ProgramBench test-pass rate by 4.3-8.7% compared with native Pi.
| Comments: | 22 pages, 9 figures, 7 tables |
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.37224 [cs.SE] |
| (or arXiv:2610.37224v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2610.37224 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Jiahong Xiang [view email]
[v1]
Tue, 27 Oct 2026 13:33:23 UTC (371 KB)
来源:arXiv cs.AI · arxiv.org