From 526fb0c111475e1a362223d8b38ca4ec2c6a1d0e Mon Sep 17 00:00:00 2001 From: Tamir Zahavi-Brunner Date: Mon, 2 Mar 2026 14:11:10 +0100 Subject: [PATCH] docs: Add filtering subagents notifications to plugin example --- packages/web/src/content/docs/plugins.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/web/src/content/docs/plugins.mdx b/packages/web/src/content/docs/plugins.mdx index a8be798217..ea25586889 100644 --- a/packages/web/src/content/docs/plugins.mdx +++ b/packages/web/src/content/docs/plugins.mdx @@ -225,6 +225,12 @@ export const NotificationPlugin = async ({ project, client, $, directory, worktr event: async ({ event }) => { // Send notification on session completion if (event.type === "session.idle") { + // Filter out notifications from subagents + const result = await client.session.get({ + path: { id: event.properties.sessionID }, + }) + if (result.error || result.data.parentID) return + await $`osascript -e 'display notification "Session completed!" with title "opencode"'` } },