diff --git a/packages/cli-workflow/src/commands/thread.ts b/packages/cli-workflow/src/commands/thread.ts index c3f66b7..46c4589 100644 --- a/packages/cli-workflow/src/commands/thread.ts +++ b/packages/cli-workflow/src/commands/thread.ts @@ -661,11 +661,12 @@ function spawnAgent( encoding: "utf8", env, stdio: ["ignore", "pipe", "pipe"], + maxBuffer: 50 * 1024 * 1024, // 50 MB — stream-json output can be large }); } catch (e) { - const err = e as NodeJS.ErrnoException & { stderr?: Buffer | string }; + const err = e as NodeJS.ErrnoException & { stderr?: Buffer | string | null }; const stderr = - err.stderr === undefined + err.stderr == null ? "" : typeof err.stderr === "string" ? err.stderr