抗挫写入:一种六层耐用写入表面用于大语言模型编码代理
Resilient Write: A Six-Layer Durable Write Surface for LLM Coding Agents
AI总结:
本文提出Resilient Write,通过六层耐用写入表面提升编码代理在文件写入时的容错能力,减少恢复时间并提高自我纠正率。
摘要:
LLM驱动的编码代理越来越多地依赖如模型上下文协议(MCP)等工具使用协议来读写开发者的工作站文件。当写入失败——由于内容过滤、截断或会话中断——代理通常得不到结构化的信号,丢失草稿并浪费令牌盲目重试。我们提出了Resilient Write,一种MCP服务器,它在代理和文件系统之间插入一个六层耐用写入表面。这些层——预飞行风险评分、事务性原子写入、可恢复分块、结构化类型错误、带外暂存存储以及任务连续性交接信封——是正交且独立可采用的。每个层映射到在2026年4月真实代理会话中观察到的具体故障模式,在该会话中内容安全过滤器静默拒绝了一个包含擦除的API密钥前缀的草稿。三个额外工具——分块预览、格式感知验证和日志分析——从使用该系统撰写本文时产生。一个186测试套件在每层验证正确性,定量比较显示相对于简单和防御性基线,恢复时间减少了5倍,代理自我纠正率提高了13倍。Resilient Write在MIT许可下开源。
英文摘要:
LLM-powered coding agents increasingly rely on tool-use protocols such as the Model Context Protocol (MCP) to read and write files on a developer's workstation. When a write fails - due to content filters, truncation, or an interrupted session - the agent typically receives no structured signal, loses the draft, and wastes tokens retrying blindly. We present Resilient Write, an MCP server that interposes a six-layer durable write surface between the agent and the filesystem. The layers - pre-flight risk scoring, transactional atomic writes, resume-safe chunking, structured typed errors, out-of-band scratchpad storage, and task-continuity handoff envelopes - are orthogonal and independently adoptable. Each layer maps to a concrete failure mode observed during a real agent session in April 2026, in which content-safety filters silently rejected a draft containing redacted API-key prefixes. Three additional tools - chunk preview, format-aware validation, and journal analytics - emerged from using the system to compose this paper. A 186-test suite validates correctness at each layer, and quantitative comparison against naive and defensive baselines shows a 5x reduction in recovery time and a 13x improvement in agent self-correction rate. Resilient Write is open-source under the MIT license.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。