arXiv 新论文做了个 Ledger 层,给编码智能体记账执行状态。GPT-5 mini 在 SWE-bench 从 56.2% 提到 64.2%,成本降 28.9%。
论文提出 Ledger,一个确定性运行时层,将编码智能体的交互历史蒸馏为显式执行状态。它在模型行动前通过 inform 路径注入状态视图,在命令执行前通过 govern 路径复用有效结果并标记冗余操作。在 SWE-bench Verified 的 500 个实例上,Ledger 将 GPT-5 mini 的 Pass@1 从 56.2% 提升至 64.2%,将 MiniMax M2.5 从 75.8% 提升至 81.0%。成本分别降低 28.9% 和 31.8%;附加到 OpenAI Codex 后 Pass@1 提升 3.4 个百分点,成本降低 24.4%。消融实验显示 govern 贡献主要正确率提升,inform 贡献主要效率提升,两者结合效果最佳。
Turning Interaction History into Execution State: A Runtime Layer for Long-Horizon Coding Agents
Long-horizon coding agents accumulate hundreds of actions and observations in their trajectories, yet nothing in this record indicates which observations still describe the repository as it currently stands. Before every decision, the model must implicitly infer the execution status from raw history, and when this inference falls short, the agent acts on outdated file contents or re-executes work whose results are still valid. We propose Ledger, a deterministic runtime layer that distills an agent's completed interactions into an explicit execution state: what has been observed, what has been modified, and what has been attempted. Ledger keeps this state in an online execution ledger and applies it at two boundaries of every step. Before the model acts, an inform path appends a compact runtime state view to the prompt; before a proposed command runs, a govern path checks it against the ledger, returning still-valid earlier results in place of re-execution and flagging likely-redundant repetition. The layer adds no language-model calls and wraps an otherwise unmodified agent. Across all 500 SWE-bench Verified instances, Ledger raises Pass@1 from 56.2% to 64.2% with GPT-5 mini and from 75.8% to 81.0% with MiniMax M2.5, while cutting total cost by 28.9% and 31.8%. Attached to OpenAI Codex, it adds 3.4 percentage points of Pass@1 at 24.4% lower cost. Ablations attribute most of the resolution gain to govern and most of the efficiency gain to inform, with their combination performing best. What long-horizon agents lack, we conclude, is not a shorter view of their history but an explicit account of their own execution state.