From 3de05f6442e1d4efe7c1c3fdd8bc9d2c6734edff Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 14 Feb 2026 14:30:38 +0900 Subject: [PATCH] fix: apply parentTools in all parent session notification paths Both parent-session-notifier.ts and notify-parent-session.ts now include parentTools in the promptAsync body, ensuring tool restrictions are consistently applied across all notification code paths. --- src/features/background-agent/notify-parent-session.ts | 1 + src/features/background-agent/parent-session-notifier.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/features/background-agent/notify-parent-session.ts b/src/features/background-agent/notify-parent-session.ts index ea28f025..da6a531e 100644 --- a/src/features/background-agent/notify-parent-session.ts +++ b/src/features/background-agent/notify-parent-session.ts @@ -148,6 +148,7 @@ export async function notifyParentSession(args: { noReply: !allComplete, ...(agent !== undefined ? { agent } : {}), ...(model !== undefined ? { model } : {}), + ...(task.parentTools ? { tools: task.parentTools } : {}), parts: [{ type: "text", text: notification }], }, }) diff --git a/src/features/background-agent/parent-session-notifier.ts b/src/features/background-agent/parent-session-notifier.ts index 28fb3a37..a0b228fc 100644 --- a/src/features/background-agent/parent-session-notifier.ts +++ b/src/features/background-agent/parent-session-notifier.ts @@ -71,6 +71,7 @@ export async function notifyParentSession( noReply: !allComplete, ...(agent !== undefined ? { agent } : {}), ...(model !== undefined ? { model } : {}), + ...(task.parentTools ? { tools: task.parentTools } : {}), parts: [{ type: "text", text: notification }], }, })