--- id: MEM-10 family: GR-MEM level: extended profiles: [storage-api, runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/gr-mem/mem-10 specification: FlowDrop Workflow Specification 1.0-draft licence: CC BY 4.0 --- # MEM-10 — A real tool result replaces the placeholder that stood in for it *GR-MEM (Part I) · level: extended · profiles: storage-api, runtime · added in 1.0* A healed message says a call was interrupted. If the result later arrives, the buffer must show the answer, not the guess. ## The rule > **Normative.** This is the rule. > > 1. When a tool result arrives for an id whose buffer entry is a synthetic healed placeholder, the real result replaces the placeholder in place (at the same position, so its adjacency to the declaring turn is preserved), and the healed marking is removed with it. > > 2. Only a placeholder is ever overwritten: after the replacement the entry is an ordinary answered result, so a second real result for the same id is deduplicated as usual, and an incoming message that is itself marked healed never replaces anything. ## What it means A healed placeholder exists so the conversation stays readable while a call's real answer is still missing. It is a guess standing in a real slot, and once the real result arrives the guess has to go — not sit alongside it, not get appended after it, but be overwritten in the exact position it held, so the result still reads immediately after the turn that declared the call. The overwrite is the whole effect: the entry becomes an ordinary answered result afterwards, indistinguishable from one that was never healed. A second copy of the same result arriving later is deduplicated the normal way, because by then there is nothing marked healed left to reclaim. ## Example A buffer holds a synthetic placeholder for a call whose real result never arrived before the turn was saved. The real result then arrives for the same id. ```json title="The buffer holding a healed placeholder for call c1" {"role": "tool", "content": "Tool call was interrupted; no result.", "metadata": {"tool_call_id": "c1", "healed": true}} ``` ```json title="What the same slot holds once the real result replaces it" verdict="replaced" {"role": "tool", "content": "Found 3 cats", "metadata": {"tool_call_id": "c1"}} ``` The buffer is no longer than it was: the turns on either side keep their positions, and the append this produces is reported as none, since a replacement changes an entry rather than adding one. ## Related rules - Names: MEM-1, MEM-3 - Referenced by: MEM-1, MEM-3, MEM-14 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.