Every bash command MUST have explicit timeout param.
Never run cmds that wait indefinitely (Start-Sleep, server without timeout, etc).
# WRONG - no timeout, can hang forever
npx playwright test src/tests/e2e
# RIGHT - timeout kills it if hangs
npx playwright test src/tests/e2e # plus tool timeout parameter- NEVER kill all node/bun process by name (
taskkill /F /IM node.exe,killall node) - This kills opencode itself
- Target specific PID by port:
netstat -ano | Select-String ":4173"→Stop-Process -Id $pid -Force
Use scripts/serve.ps1:
scripts/serve.ps1 -Rebuild # rebuild + start on 4173
scripts/serve.ps1 -Kill # kill process on 4173
scripts/serve.ps1 -Port 4174 -Rebuild # custom portScript returns ready PID <num> or killed PID <num>. Always runs with timeout.
Expected durations + tool timeout:
npm run test: 30snpm run build: 30snpx playwright test: 120sscripts/serve.ps1: 20s (10s poll + buffer)