Capture child output statically to avoid issues with generators and serialization.