// Otherwise wait for stream to finish and return full output
awaitstreamPromise;
awaitstreamDrained;
log.debug(
`[TerminalManager] Command for workflow ${workflowId} completed in ${durationMs}ms with exit code ${result.exitCode} (${output.length} output chunks)`,