diff --git a/tests/claude-code/test-helpers.sh b/tests/claude-code/test-helpers.sh index 9e187610..6dd4a558 100755 --- a/tests/claude-code/test-helpers.sh +++ b/tests/claude-code/test-helpers.sh @@ -15,8 +15,9 @@ run_claude() { cmd+=(--allowed-tools="$allowed_tools") fi - # Run Claude in headless mode with timeout - if timeout "$timeout" "${cmd[@]}" > "$output_file" 2>&1; then + # Run Claude in headless mode with timeout. Redirect stdin from + # /dev/null so the CLI can't block waiting for input and hang the suite. + if timeout "$timeout" "${cmd[@]}" > "$output_file" 2>&1 < /dev/null; then cat "$output_file" rm -f "$output_file" return 0