hook failed

Bug Report: Hooks fail on Windows after Qoder update (2026-04-27)

Summary

After updating Qoder CLI on 2026-04-27, all command type hooks fail with “Hook failed” error on Windows, regardless of the command used (bash scripts, cmd/bat scripts, absolute paths, etc.).

Environment

  • OS: Windows 10.0.26200
  • Shell: Git Bash (GNU bash 5.2.15, MSYS)
  • Project path: D:\Study\study-ai

Reproduction

Original configuration (worked before update):

"hooks": {
  "Stop": [{
    "matcher": "*",
    "hooks": [{
      "type": "command",
      "command": "bash \"$QODER_PROJECT_DIR/.qoder/hooks/hook-runner.sh\" stop \"$QODER_PROJECT_DIR/.qoder/hooks\" \"$HOME/.qoder/hooks\"",
      "timeout": 60
    }]
  }]
}

Troubleshooting attempts (all failed):

  1. Original config$QODER_PROJECT_DIR not expanded
  2. Absolute POSIX pathbash "/d/Study/study-ai/.qoder/hooks/hook-runner.sh" stop ... — still fails
  3. Windows bat filecmd /c "D:\Study\study-ai\.qoder\hooks\hook-runner.bat" stop — still fails
  4. Simplest script — even a script with just exit /b 0 fails

Hook runner script content (minimal):

#!/bin/bash
exit 0

Bat file content (minimal):

@echo off
exit /b 0

Both work fine when run manually from the terminal, but fail when invoked by Qoder’s hook system.

Expected behavior

Hooks should execute and return exit code 0 without errors.

Actual behavior

Every hook displays “Hook failed” with no additional error details.

Notes

  • This is a regression — hooks worked correctly before today’s Qoder update
  • The issue affects all command-type hooks, not just specific ones
  • No additional error information is provided beyond “Hook failed”
  • The hook scripts themselves execute correctly when run manually