From 59638ce1d976ba74a9e9f135828979f9c6801d7a Mon Sep 17 00:00:00 2001 From: homelab-coder Date: Fri, 3 Jul 2026 14:58:24 +0000 Subject: [PATCH] fix: increase SPAWN_TIMEOUT_MS from 30s to 60s 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. --- src/agent/agent-task-executor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/agent-task-executor.js b/src/agent/agent-task-executor.js index 91f9aee9..f7076f75 100644 --- a/src/agent/agent-task-executor.js +++ b/src/agent/agent-task-executor.js @@ -827,7 +827,7 @@ function parseTaskIdFromOutput(stdout) { function spawnTaskProcess({ agent, ctPath, args, cwd, spawnEnv }) { // Timeout for spawn phase - if CLI hangs during init (e.g., opencode 429 bug), kill it - const SPAWN_TIMEOUT_MS = 30000; // 30 seconds to spawn task + const SPAWN_TIMEOUT_MS = 60000; // 60 seconds to spawn task (allows for LM Studio model priming) return new Promise((resolve, reject) => { const proc = spawn(ctPath, args, { @@ -1483,7 +1483,7 @@ async function spawnClaudeTaskIsolated(agent, context) { // STEP 1: Spawn task and extract task ID (same as non-isolated mode) // Timeout for spawn phase - if CLI hangs during init (e.g., opencode 429 bug), kill it - const SPAWN_TIMEOUT_MS = 30000; // 30 seconds to spawn task + const SPAWN_TIMEOUT_MS = 60000; // 60 seconds to spawn task (allows for LM Studio model priming) // Note: Auth env vars are injected by IsolationManager, we only need model mapping here const isolatedEnv = providerName === 'claude' ? buildClaudeEnv(modelSpec, { includeAuth: false }) : {};