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 <noreply@anthropic.com>
This commit is contained in:
zerone0x
2026-02-18 18:10:04 +01:00
committed by Peter Steinberger
parent 7c3c406a35
commit 0f7b259cca

View File

@@ -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 =