copy_stream_to_file dropped the copy and flush errors, so an ENOSPC or pipe error left a truncated .out/.err with no trace while the task still reported its exit status. It now returns the error and the runner logs it with the stream and file path.