diff --git a/packages/core/src/agent/agent.ts b/packages/core/src/agent/agent.ts index 800ca6f0e..a3aa23315 100644 --- a/packages/core/src/agent/agent.ts +++ b/packages/core/src/agent/agent.ts @@ -3794,6 +3794,12 @@ export class Agent { } private shouldPersistMemoryForContext(oc: OperationContext): boolean { + // Skip memory persistence for delegated sub-agent calls to prevent + // polluting the parent conversation's memory with duplicate messages. + // See: https://github.com/VoltAgent/voltagent/issues/1026 + if (oc.parentAgentId) { + return false; + } return !this.isReadOnlyMemoryForContext(oc); }