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(hooks): require successful shell probe in observe runner (#2403)

JongHyeok Parked387446052d
diff --git a/scripts/hooks/observe-runner.js b/scripts/hooks/observe-runner.js
index 28e7f4fb0..c046d75f0 100644
--- a/scripts/hooks/observe-runner.js
+++ b/scripts/hooks/observe-runner.js
@@ -61,7 +61,10 @@ function findShellBinary() {
stdio: 'ignore',
windowsHide: true
});
- if (!probe.error) {
+ // Require the probe to actually succeed, not just spawn: Windows'
+ // System32\bash.exe (WSL launcher) spawns even with no distro installed but
+ // exits non-zero, so `!probe.error` alone would treat it as a usable shell.
+ if (!probe.error && probe.status === 0) {
return candidate;
}
}