We compute, for cosmological backgrounds, the O(d, d; ℝ) invariant beta functions for the sigma model of the bosonic string at two loops. This yields an independent first-principle derivation of the order α′ corrections to the cosmological target-space equations. To this end we revisit the quantum consistency of Tseytlin’s duality invariant formulation of the worldsheet theory. While we confirm the absence of gravitational (and hence Lorentz) anomalies, our results show that the minimal subtraction scheme is not applicable, implying significant technical complications at higher loops. To circumvent these we then change gears and use the Polyakov action for cosmological backgrounds, applying a suitable perturbation scheme that, although not O(d, d; ℝ) invariant, allows one to efficiently determine the O(d, d; ℝ) invariant beta functions.