diff --git a/src/router.ts b/src/router.ts index 0a86ec0..544ecaa 100644 --- a/src/router.ts +++ b/src/router.ts @@ -79,6 +79,18 @@ export class EventRouter { return; } + // Ignore system messages — they are lifecycle notifications, not user input + if (authorType === 'system') { + this.log.info('│ Skipping system message: "%s"', content.slice(0, 100)); + return; + } + + // Ignore own messages (agent talking to itself) + if (resolvedAuthorSlug === this.config.slug) { + this.log.info('│ Skipping own message'); + return; + } + // Build context-rich prompt for the agent const ctx = taskId ? `[задача ${taskKey || taskId}]` : chatId ? '[чат]' : ''; const from = authorType === 'system' ? '[система]' : `@${resolvedAuthorSlug}`;