diff --git a/src/state/memory-utils.ts b/src/state/memory-utils.ts index aa0bcc5b..5baac175 100644 --- a/src/state/memory-utils.ts +++ b/src/state/memory-utils.ts @@ -20,5 +20,11 @@ export function memoryToObservation(memory: Memory): CompressedObservation { concepts: memory.concepts, files: memory.files, importance: memory.strength, + // #817: carry agentId through so agent-scope isolation in + // mem::search applies to memories too. Without this, a memory + // saved via /remember loads with agentId=undefined and gets + // dropped by the isolated-mode filter — hiding an agent's own + // remembered memories from itself. + agentId: memory.agentId, }; }