Genko 原稿Back to edition

Spine: Compiling Subtask Trees into Structured Context for Long-Horizon Coding Agents

Long-horizon coding agents bloat context, and trimming loses unfinished work. Spine compiles a subtask tree per call: +11.8% score, 32.4% less cost.

The explainer · 251 words

The claim

Spine compiles a subtask tree into context, so coding agents score higher at lower cost.

The problem

Long-horizon coding tasks contain many nested subtasks that build on each other.

Sequential history keeps growing until context inflates and model quality degrades.

Trimming that history can discard information unfinished subtasks still need.

How it works

Spine lets the agent declare explicit subtask boundaries through work scopes.

One agent runs every nested subtask inline instead of delegating each one.

Delegation stays reserved for independent tasks that can run in parallel.

A persistent SpineTree records subtask relations, interactions, completion states, and returned results.

Before each model call, the runtime compiles the tree just in time.

Figures

History handlingTwo ways to manage one long coding session.

Native Codex

  • Sequential history keeps growing until context bloats.
  • Trimming risks dropping unfinished work.
  • Delegation adds coordination overhead.
Score against costNative Codex compared with SpineCodex on the SWE-Milestone benchmark.
Native Codex · baselineSpineCodex · +11.8% score, −32.4% cost
Reference score reported for native Codex.
Reported against native Codex on the same tasks.

50% SpineCodex · 50% Native Codex

What changes

Completed subtasks reduce to their results while unfinished ones keep full detail.

SpineCodex lifts SWE-Milestone Score by 11.8% over native Codex.

Total cost falls by 32.4% while ProgramBench test-pass rate rises 17.3%.

Limits

Most results come from benchmarks rather than live repositories.

The agent must declare work scopes for the tree to help at all.

Headline results use GPT-5.6 Sol, with two open models following on Pi.

Source · arXiv

More from this edition