Auto-sync: 2026-04-17 19:17

This commit is contained in:
2026-04-17 19:17:27 +08:00
parent a1c4f6495b
commit 52c143d5e4
49 changed files with 1444 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
---
title: "竞态条件"
type: concept
tags: []
---
## Definition
Sub-agent 并发编辑共享文件时导致的静默失败问题。原因是 edit tool 需要精确的 oldText 匹配,如果子代理在主会话读取和编辑之间修改了文件,编辑会静默失败。
## Solution
分离任务文件为两个角色:
1. `AUTONOMOUS.md` — 只读主文件,只包含目标和开放 backlog只有主会话编辑
2. `memory/tasks-log.md` — 追加日志,子代理只追加新行,从不编辑现有行
## Related
- [[Goal-Driven Autonomous Tasks]]
- [[Subagent 管理]]