Skip to main content

record_agentmux_write

Function record_agentmux_write 

Source
pub(crate) fn record_agentmux_write(
    uid: &str,
    dir: &Path,
    file: &str,
    body: &[u8],
    source: &str,
    source_detail: &str,
)
Expand description

An AgentMux write to an agent’s memory — MemoryWrite, the Memory editor, a revert, a bundle import — recorded before the file is written (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md §2.1.1), so the next spawn doesn’t take it for the provider’s, and it follows the agent at once.

Only into the agent’s own folder (a claim it holds alone), on the version that folder holds: if the record changed the file elsewhere since, nothing is recorded and the next spawn’s reconcile keeps both. Never fails the write: an error is logged, and a later capture records the file.