eca
eca copied to clipboard
Custom tools hang on Windows — `p/shell "bash -c"` blocks indefinitely
Custom tools defined in config.json hang indefinitely on Windows (MSYS2/ucrt64). The tool invocation never returns, even for trivial commands like echo hello.
Root Cause
custom.clj hardcodes "bash -c" via p/shell:
;; src/eca/features/tools/custom.clj line 29
(p/shell {:dir work-dir
:out :string
:err :string
:continue true} "bash -c" resolved-command)
This differs from shell.clj which:
- Respects the
toolCall.shellCommandconfig (shell-path,shell-args) - Uses platform detection (
powershell.exeon Windows,bashon Unix)
The p/shell call with "bash -c" on Windows appears to block — the process is visible in Process Explorer but never completes, even for echo hello.
Expected Behavior
Custom tools should use the same shell execution logic as the native shell_command tool, i.e., either:
- Respect the
toolCall.shellCommand.pathandtoolCall.shellCommand.argsconfig - Or use the platform-aware
start-shell-process!function fromshell.clj