Your AI agent optimises for passing tests, not for energy.
Coding agents change code until tests pass. Left alone they chase speed or style and can break behaviour while 'optimising'. GreenCode's Constitution gives an agent five inviolable rules, correctness first, and 37 ranked anti-patterns to hunt.
GreenCode researchers wrote energy rules for AI coding agents, and the agents saved 25.1% of the energy.
GreenCode helps tackle this by publishing the Constitution for anyone to use. An AI agent profiles the code, fixes ranked energy anti-patterns, measures again and keeps only the changes that save energy, leaving changes developers can review. More on this.
Your AI agent optimises for passing tests, not for energy. Coding agents change code until the tests pass. Left alone, they chase speed or style. And while optimising, they can quietly break what the code does. Here is the fix you can use today. Give your agent written energy rules, as a skill or a rules file. Make correctness, security and public interfaces rules it can never break. Ask it to explain each change. And ask it to measure energy before and after. GreenCode researchers wrote energy rules for AI coding agents. The agents saved twenty-five point one percent of the energy. That was across forty-five problems, in six programming languages. The rules put correctness first, then list thirty-seven kinds of waste to hunt. You can start with the GreenCode Constitution skill, which gives your agent these rules. Then check the results using tools like its profiler and EnergyBench. GreenCode helps tackle this by publishing the Constitution for anyone to use. The agent keeps only what saves energy, in changes developers can review. That was GreenCode Tech Tip number four. Follow for the next tip, and find more on greencode.ai/tech-tips.
Share this