Assuming no extinction, climate change, nor heat death of the universe.

Evolution is not a particularly fast optimizer, on the scale of human perception.

Evolution as we know it works on Earth because it is a relatively protected and stable environment, giving genes the time they need to explore a space and adapt to the relatively slow and small changes on Earth.

Imho genes are not what if at all should be attributed aggncy here (that might, if at all, be the decentralised sympoietic process of ecosystems)

Just wanted to add this, i see where the formulation is useful as a figure of speech.

Climate change?

Climate change produces a changed environment. It actually drives more evolution to adapt to that changed environment.

Even very sudden changes such as some that caused mass extinctions, it just changed the direction of evolution. The only species that stopped evolving were those that went extinct. No more dinosaurs (bar birds) but lots more mammals.