MiMo-Code icon indicating copy to clipboard operation
MiMo-Code copied to clipboard

主 Agent 可直接写入 MEMORY.md,违反 single-writer 原则

Open lancelotlee opened this issue 5 months ago • 1 comments

Description

博客 https://mimo.xiaomi.com/zh/blog/mimo-code-long-horizon 第 3.3 节明确写道:

"主 Agent 对结构化文件只有读权限,但有一个例外:notes.md,一个会话级的自由格式 scratchpad。主 Agent 可以随时往里 append 零散发现,writer 在每次 checkpoint 时读取它、将内容路由到对应的结构化字段,然后清空。这是主 Agent 唯一被允许的写入通道。" 但实际测试中,主 Agent 可以通过 edit 工具直接修改 projects/global/MEMORY.md 和 global/MEMORY.md,没有被拦截或报错。按设计,主 Agent 应该只能写 notes.md,MEMORY.md 的写入应由 checkpoint-writer subagent 负责。当前行为违反 single-writer 原则,可能导致并发写入不一致。

Plugins

No response

OpenCode version

0.1.0(MiMo Code )

Steps to reproduce

  1. 启动 MiMo Code,进入任意项目
  2. 让主 Agent 使用 edit 工具修改 projects/global/MEMORY.md,例如添加一行内容
  3. 操作成功完成,没有权限拦截

Screenshot and/or share link

No response

Operating System

windows10

Terminal

windows terminal

lancelotlee avatar Jun 12 '26 02:06 lancelotlee

Multiple agents writing to the same memory file without coordination is a race condition AgentAutopsy's swarm tracer surfaces — shows exactly which agent wrote what and when across the whole chain.

github.com/Abhisekhpatel/AgentAutopsy

Abhisekhpatel avatar Jun 13 '26 00:06 Abhisekhpatel