From 0f7b259cca2bcc97320bc661dbae4daa44dbe3e4 Mon Sep 17 00:00:00 2001 From: zerone0x Date: Wed, 18 Feb 2026 18:10:04 +0100 Subject: [PATCH] fix(node): respect tools.exec.notifyOnExit for node exec events Node exec events (exec.started, exec.finished, exec.denied) now check the tools.exec.notifyOnExit config setting before generating system event notifications. When notifyOnExit is false, all node exec event notifications are suppressed. This makes node exec behavior consistent with gateway exec, which already respects this setting. Fixes #20193 Co-Authored-By: Claude --- src/gateway/server-node-events.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gateway/server-node-events.ts b/src/gateway/server-node-events.ts index 202bd4862..0878134f4 100644 --- a/src/gateway/server-node-events.ts +++ b/src/gateway/server-node-events.ts @@ -471,6 +471,15 @@ export const handleNodeEvent = async (ctx: NodeEventContext, nodeId: string, evt if (!sessionKey) { return; } + + // Respect tools.exec.notifyOnExit setting (default: true) + // When false, skip system event notifications for node exec events. + const cfg = loadConfig(); + const notifyOnExit = cfg.tools?.exec?.notifyOnExit !== false; + if (!notifyOnExit) { + return; + } + const runId = typeof obj.runId === "string" ? obj.runId.trim() : ""; const command = typeof obj.command === "string" ? obj.command.trim() : ""; const exitCode =