diff --git a/scripts/notify.cmd b/scripts/notify.cmd index 246f394..ef58437 100644 --- a/scripts/notify.cmd +++ b/scripts/notify.cmd @@ -29,7 +29,12 @@ if exist "%LOCK%" call :reclaim rem atomic lock: only the first hook spawns the worker; others fall through and just rem report progress -> no duplicate downloads even when hooks fire concurrently. -mkdir "%LOCK%" 2>nul && start "" /b "%~f0" __download nul 2>&1 +rem +rem must use Start-Process (not `start /b`): a child started by cmd inherits the +rem hook's stdout pipe handle, so Claude won't see EOF until the download ends -> +rem the hook would block. Start-Process spawns WITHOUT inheriting handles, so the +rem hook returns immediately while curl keeps running detached. +mkdir "%LOCK%" 2>nul && powershell -nop -w hidden -c "Start-Process -WindowStyle Hidden -FilePath '%~f0' -ArgumentList '__download'" >nul 2>&1 rem downloaded size so far (from the .partial file), shown as X.X MB set "DLBYTES=0"