Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: add spawnSync error logging and restore 5s timeout

Jonghyeok Parkf6b10481f3d4
diff --git a/hooks/hooks.json b/hooks/hooks.json
index d49b401ad..d8bdef3c9 100644
--- a/hooks/hooks.json
+++ b/hooks/hooks.json
@@ -297,7 +297,7 @@
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"stop:desktop-notify\" \"scripts/hooks/desktop-notify.js\" \"standard,strict\"",
"async": true,
- "timeout": 5
+ "timeout": 10
}
],
"description": "Send macOS desktop notification with task summary when Claude responds"
diff --git a/scripts/hooks/desktop-notify.js b/scripts/hooks/desktop-notify.js
index a9bd2540b..8d844e032 100644
--- a/scripts/hooks/desktop-notify.js
+++ b/scripts/hooks/desktop-notify.js
@@ -47,7 +47,10 @@ function notifyMacOS(title, body) {
const safeBody = body.replace(/\\/g, '').replace(/"/g, '\u201C');
const safeTitle = title.replace(/\\/g, '').replace(/"/g, '\u201C');
const script = `display notification "${safeBody}" with title "${safeTitle}"`;
- spawnSync('osascript', ['-e', script], { stdio: 'ignore', timeout: 3000 });
+ const result = spawnSync('osascript', ['-e', script], { stdio: 'ignore', timeout: 5000 });
+ if (result.error || result.status !== 0) {
+ log(`[DesktopNotify] osascript failed: ${result.error ? result.error.message : `exit ${result.status}`}`);
+ }
}
// TODO: future platform support