Skip to content

Custom tools hang on Windows — p/shell "bash -c" blocks indefinitely #421

@snoopier

Description

@snoopier

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:

  1. Respects the toolCall.shellCommand config (shell-path, shell-args)
  2. Uses platform detection (powershell.exe on Windows, bash on 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:

  1. Respect the toolCall.shellCommand.path and toolCall.shellCommand.args config
  2. Or use the platform-aware start-shell-process! function from shell.clj

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions