diff --git a/packages/client-slack/src/messages.ts b/packages/client-slack/src/messages.ts index 4b94c759f30..b7f8b204549 100644 --- a/packages/client-slack/src/messages.ts +++ b/packages/client-slack/src/messages.ts @@ -245,6 +245,15 @@ export class MessageManager { `${event.ts}-${this.runtime.agentId}` ); + // Ensure both the sender and agent are properly set up in the room + await this.runtime.ensureConnection( + userId, + roomId, + event.user, + event.user, + "slack" + ); + // Create initial memory console.log("💾 Step 5: Creating initial memory"); const content: Content = {