diff --git a/src/main/runtime/orchestration/worker-output-archive.ts b/src/main/runtime/orchestration/worker-output-archive.ts index c1b93371bbe..d7e894cf54c 100644 --- a/src/main/runtime/orchestration/worker-output-archive.ts +++ b/src/main/runtime/orchestration/worker-output-archive.ts @@ -190,6 +190,9 @@ export function boundArchiveLines(lines: string[]): { lines: string[]; truncated let total = 0 for (const line of lines) { total += line.length + 1 + if (total > TERMINAL_ARCHIVE_MAX_CHARS) { + break + } } if (total <= TERMINAL_ARCHIVE_MAX_CHARS) { return { lines, truncated: false }