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
Commit 3305da8
Browse filesBrowse the repository at this point in the historyBrowse files
fix: prevent infinite hang when provider CLI hangs (opencode 429 bug)
Problem:
- When opencode (or any provider CLI) hangs due to API errors like 429,
zeroshot workers would wait forever because exec() had no timeout
- The consecutive failure counter only increments when callback fires,
but a hung process = callback never fires = infinite wait
Solution:
1. Created src/lib/safe-exec.js wrapper that enforces timeouts (default 30s)
2. Updated agent-task-executor.js to use safe-exec
3. Updated isolation-manager.js to use safe-exec + added timeout to execInContainer()
4. Added ESLint rule to prevent direct child_process exec/execSync usage
Now if a provider hangs:
- 5s timeout kills the process
- Callback fires with timeout error
- Worker fails gracefully instead of freezing
Root cause in opencode: anomalyco/opencode#8203
Co-Authored-By: Claude Opus 4.5 <[email protected]>
0 commit comments