You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PowerShell calls (monitors, windows, OCR) have no timeout and can hang tools indefinitely #183
The PowerShell helpers that enumerate monitors and windows and run OCR have no timeout. A stuck WinRT call (a locked or corrupt PNG, a hung OCR engine, a slow WMI query) makes find_text, screenshot, start_recording and anything else that resolves a target hang forever. The agent gets no error and has nothing to retry.
Evidence
src/utils/monitors.ts:90-93: execFile("powershell", [...], { encoding: "utf8", windowsHide: true, maxBuffer: ... }) with no timeout.
Add a shared runPowerShell(script, { timeoutMs }) helper with timeout and killSignal set. Give it a sensible default (for example 20 s for enumeration, 60 s for OCR) and an env override.
Replace Wait(-1) with a finite wait that throws a clear error.
Map a timeout to an actionable ScreencastError such as "Window enumeration timed out after 20 s".
Done when
No PowerShell call path can block indefinitely.
A unit test with a fake slow command asserts the timeout error.
Activity