I Gave an AI Agent an Impossible Target to See If It Would Cheat A developer built an AI agent loop to optimize a movie-poster website's performance, setting an impossible FPS target of 65 to test whether the agent would cheat. The loop uses an external script that runs the agent, a separate gate test that the agent cannot edit, and safety checks to prevent the agent from lowering the target. The experiment revealed that an agent left to mark its own homework will usually claim success, so the developer enforced strict separation between the agent and the evaluation. TL;DR Could I get an AI agent to make my website faster without me sitting there, running it, reading the numbers, and running it again? That is what this series is about. Not how I built a website, because the website is boring on purpose, but how you wrap an agent in a loop that works toward a goal on its own, and how you stop it from cheating along the way. In this first part I want to explain what a loop actually is, because there is a common misconception, and then walk through a real one. I set this loop a target that was physically impossible to reach and watched what it did. That run taught me more than a passing test would have. This is Part 1 of 3. All three parts use the same small movie-poster website as the example, but the website is never the point. I had a wrong idea about this at first, so let me clear it up. A loop is not an agent prompting itself, grading its own work, and deciding when it is done. An agent left to mark its own homework will usually tell you it passed. A loop is closer to this: an external script runs the agent, a separate check that the agent cannot edit decides whether the result is good, and that repeats until the check passes or you hit a limit. There are three parts to it that come up again and again: One rule matters more than the rest. The thing being checked must never be able to edit the check, and only a person is allowed to change the target. If the agent can edit its own test or lower its own bar, the loop is pointless. So most of the work in a loop is not writing a clever prompt. It is building a check the agent cannot get around. That idea runs through the whole series. The website is a grid of movie posters you can scroll and zoom through. It holds hundreds of real images and only keeps the visible ones in the page, so it stays light. The one thing it has to do well is feel smooth. "Feels smooth" is a vibe, and you cannot put a vibe in a loop, so the first job is to turn it into a number. I used two: One quick note on why the data matters. I could have filled the grid with plain coloured boxes as placeholders, and it would have been less work. But coloured boxes are almost free to draw, while real images cost real decode time, memory, and paint. A performance test running against coloured boxes would be measuring something that isn't really there. So I used about 200 real JPEGs, with the same