CORVUS: Context Optimization and Reduction Via Underlying Synchronization for LLM Coding Agents

CORVUS: Context Optimization and Reduction Via Underlying Synchronization for LLM Coding Agents

CORVUS:面向大模型编程智能体的底层同步上下文优化与精简技术


LLM coding agents operate by constructing trajectories that accumulate reasoning, tool calls, and results to enable multi-step decision-making. However, the conventional append-only trajectory architecture found in practice tightly couples file-read actions with their observations, capturing snapshots that become permanently fixed in the chronological history.

大模型(LLM)编程智能体通过构建轨迹来运行,这些轨迹累积了推理过程、工具调用和执行结果,从而实现多步决策。然而,实践中常见的“仅追加”(append-only)轨迹架构将文件读取操作与其观测结果紧密耦合,捕获的快照在时间轴历史中被永久固定。

As files change through agent edits or concurrent human modifications, these snapshots become stale, causing reasoning errors and causing agents to redundantly re-read files, with each re-read appending yet another copy to the trajectory.

随着文件因智能体编辑或人类并发修改而发生变化,这些快照会变得陈旧,从而导致推理错误,并迫使智能体重复读取文件,每一次重复读取都会在轨迹中追加一份新的副本。

To mitigate this, we propose CORVUS, a novel trajectory architecture that decouples file-read actions from their observations by maintaining a synchronized registry of relevant files and injecting only their current contents at each reasoning cycle.

为了缓解这一问题,我们提出了 CORVUS,这是一种新颖的轨迹架构。它通过维护一个相关文件的同步注册表,并在每个推理周期仅注入文件的当前内容,从而实现了文件读取操作与观测结果的解耦。

This structural change produces significantly lighter-weight trajectories that remain synchronized with the actual codebase state by construction, eliminating redundant file copies and stale snapshots that bloat conventional trajectories.

这种结构性变革产生了显著更轻量的轨迹,在构建上始终与实际代码库状态保持同步,消除了导致传统轨迹臃肿的冗余文件副本和陈旧快照。

We evaluated CORVUS on SWE-POLYBENCH_VERIFIED and SWE-BENCH PRO across four LLMs, achieving 9-50% reduction in average input tokens per task, 15-32% shorter final prompts, and up to 37% fewer reasoning cycles while maintaining comparable pass rates.

我们在四个大模型上对 SWE-POLYBENCH_VERIFIED 和 SWE-BENCH PRO 进行了 CORVUS 评估。结果显示,在保持相当通过率的同时,每个任务的平均输入 Token 减少了 9-50%,最终提示词长度缩短了 15-32%,推理周期减少了高达 37%。