Skip to content

Stop hook hangs on Windows when review gate is disabled (stdin blocking) #191

@emamimohsen

Description

@emamimohsen

On Windows with Git Bash as the configured shell, the Stop hook opens a new terminal window and hangs indefinitely (up to
the 900s timeout) after every Claude response, even when the review gate is disabled.

stop-review-gate-hook.mjs calls fs.readFileSync(0, "utf8") (blocking stdin read) at the top of main(), before checking
whether config.stopReviewGate is enabled. On Windows with Git Bash, the hook runner does not properly pipe/close stdin for
the spawned Node.js process, so the read blocks forever.

The gate check at line 154 (if (!config.stopReviewGate) { return; }) never runs because execution is stuck at line 143
(readHookInput()).

Environment:

  • OS: Windows 11 Enterprise
  • Shell: Git Bash (C:/Users/.../Git/usr/bin/bash.exe)
  • Claude Code with Codex plugin v1.0.3
  • Review gate: disabled (stopReviewGate: false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions