fix: increase SPAWN_TIMEOUT_MS from 30s to 60s#538
Open
homelab-coder wants to merge 1 commit into
Open
Conversation
The 30-second spawn timeout causes validator crashes with opencode provider when LM Studio model priming takes >30s. Increase to 60s to accommodate slow model initialization on consumer hardware.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The hardcoded
SPAWN_TIMEOUT_MS = 30000(30 seconds) inagent-task-executor.jscauses validator crashes with theopencodeprovider when LM Studio model priming takes longer than 30s. This is a known issue on consumer hardware where model priming (warming up KV cache / compute graph) can take 10-15s, pushing total CLI startup to 35-40s.When the timeout fires:
Spawn timeout after 30s - provider CLI hungFix
Increase
SPAWN_TIMEOUT_MSfrom30000to60000in both spawn task process functions (non-isolated and isolated modes). This accommodates slow model initialization without significantly impacting detection of genuinely hung CLIs.Changes
src/agent/agent-task-executor.js:SPAWN_TIMEOUT_MS = 30000→60000(2 occurrences, lines ~830 and ~1486)Testing
Verified by running
zeroshot run 20 --pr --provider opencode -dagainst the latent-space-dance-off repo (Issue #20: format_duration inconsistency). The previous attempt with 30s timeout produced 725 messages over ~20 minutes in a reject→retry loop. With 60s timeout, validators should complete successfully within their spawn window.