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.


翻译:基于大语言模型的编码代理日益依赖工具调用协议(如模型上下文协议MCP)在开发者工作站上读写文件。当写入因内容过滤器、截断或会话中断而失败时,代理通常无法获取结构化信号,既丢失草稿,又会因盲目重试浪费令牌。我们提出弹性写入系统——一种在代理与文件系统之间插入六层持久化写入表面的MCP服务器。六层包括:预检风险评分、事务性原子写入、断点续传分块、结构化类型错误、带外暂存存储以及任务连续性切换信封,各层相互正交且可独立采用。每层均对应一个具体的故障模式——这些模式源自2026年4月一次真实代理会话(其中内容安全过滤器静默拒绝了一段经清理的API密钥前缀文本)的观测结果。在撰写本论文过程中,我们还衍生出三个附加工具:分块预览、格式感知验证和日志分析。资源库包含186项测试用例用于验证各层正确性,与朴素基线和防御性基线的定量对比显示:恢复时间降低5倍,代理自我修正率提升13倍。弹性写入系统采用MIT开源许可证发布。

0
下载
关闭预览

相关内容

基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
读扩散?写扩散?推拉架构一文搞定!
架构师之路
17+阅读 · 2019年2月1日
可能是 Android 上最好用的写作 App
少数派
11+阅读 · 2018年12月21日
【干货】深入理解自编码器(附代码实现)
推荐中的序列化建模:Session-based neural recommendation
机器学习研究会
18+阅读 · 2017年11月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月15日
VIP会员
最新内容
21世纪的无人机战争
专知会员服务
1+阅读 · 34分钟前
《量子技术的军事任务技术适配与利用》
专知会员服务
1+阅读 · 48分钟前
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员