AI-shaped from my notes. Requires review before publishing.
Last week, Codex suggested about six ways to make our new website load faster.
I’d reviewed them, so I gave it this instruction.
Try each one. Keep the changes that work, revert the ones that don’t, and keep going until the performance score reaches 100 or you can’t get it any higher.
I added two guardrails. It couldn’t do anything that affected the user experience, and it couldn’t go beyond the ideas I’d already approved.
Then I went to the gym.
About 45 minutes later (short? yeah whatever at least I went), I came back and the site’s Lighthouse performance score was 100.

The goal loop
Most of my AI use starts with a task, like changing a page or fixing a bug.
This was different. I’d given Codex an outcome it could measure, permission to keep working towards it and a clear point at which to stop. The cool kids on X call this a “goal loop”.
It ran the loop without me, testing each change, keeping the improvements, rolling back the failures and moving on.
The guardrails mattered as much as the target. Much like humans, AI responds to incentives: without guardrails it would aggressively optimise for one number while sacrificing everything else. By saying “don’t compromise the user experience” I was confident it wouldn’t go too off piste.
It felt magical. A technical job that could easily have taken hours was finished in 45 minutes while I wasn’t even there.
Any job with a reliable measure of success has this potential. Give Codex a target it can measure, constrain the ways it is allowed to pursue it, and tell it when to stop.
Then go to the gym.