fix: OpenCode SDKサーバー起動タイムアウトを30秒に延長

This commit is contained in:
nrslib 2026-02-13 11:00:26 +09:00
parent 76fed1f902
commit 0b2fa0e0f7

View File

@ -36,6 +36,7 @@ const OPENCODE_STREAM_ABORTED_MESSAGE = 'OpenCode execution aborted';
const OPENCODE_RETRY_MAX_ATTEMPTS = 3; const OPENCODE_RETRY_MAX_ATTEMPTS = 3;
const OPENCODE_RETRY_BASE_DELAY_MS = 250; const OPENCODE_RETRY_BASE_DELAY_MS = 250;
const OPENCODE_INTERACTION_TIMEOUT_MS = 5000; const OPENCODE_INTERACTION_TIMEOUT_MS = 5000;
const OPENCODE_SERVER_START_TIMEOUT_MS = 30000;
const OPENCODE_RETRYABLE_ERROR_PATTERNS = [ const OPENCODE_RETRYABLE_ERROR_PATTERNS = [
'stream disconnected before completion', 'stream disconnected before completion',
'transport error', 'transport error',
@ -324,6 +325,7 @@ export class OpenCodeClient {
port, port,
signal: streamAbortController.signal, signal: streamAbortController.signal,
config, config,
timeout: OPENCODE_SERVER_START_TIMEOUT_MS,
}); });
opencodeApiClient = client; opencodeApiClient = client;
serverClose = server.close; serverClose = server.close;