From ba6a01aebc95e158d2ffa4fe27f5cb9bfdaf003a Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Fri, 6 Feb 2026 15:57:15 -0800 Subject: [PATCH] address bugbot comments --- apps/sim/lib/execution/isolated-vm.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/sim/lib/execution/isolated-vm.ts b/apps/sim/lib/execution/isolated-vm.ts index 6d284babf..42870dce2 100644 --- a/apps/sim/lib/execution/isolated-vm.ts +++ b/apps/sim/lib/execution/isolated-vm.ts @@ -143,7 +143,7 @@ function truncateString(value: string, maxChars: number): { value: string; trunc } function normalizeFetchOptions(options?: IsolatedFetchOptions): SecureFetchOptions { - if (!options) return {} + if (!options) return { maxResponseBytes: MAX_FETCH_RESPONSE_BYTES } const normalized: SecureFetchOptions = { maxResponseBytes: MAX_FETCH_RESPONSE_BYTES, @@ -851,7 +851,8 @@ function dispatchToWorker( error: { message: 'Failed to send execution request to worker', name: 'WorkerError' }, }) resetWorkerIdleTimeout(workerInfo.id) - drainQueue() + // Defer to break synchronous recursion: drainQueue → dispatchToWorker → catch → drainQueue + queueMicrotask(() => drainQueue()) } }