· ai-devtools

Producing Healthy Code with Artificial Intelligence Costs Fewer Tokens

In his presentation on AI-friendly code at GOTO Copenhagen, Adam Tornhill showed that healthy code makes AI perform better and costs fewer tokens.


Safeguarding means keeping code health high through agentic refactoring, with an MCP supplying code health data, so AI can maintain the code it generates. Developing software with agents is significantly harder than writing code manually, Tornhill argued. But with agentic AI, they can complete tasks two to three times faster, he added.

It also helps them unblock themselves and reduces coordination needs. Tornhill mentioned a study done on 1000+ open-source projects which showed that with AI, velocity went up during the first few weeks, but after two months the velocity gains were fully canceled out due to a massive increase in code complexity: AI operates in a self-harm mode, often writing code it cannot reliably maintain later. Code health measures how easy code is to understand, change, and maintain.

Earlier coverage

Related coverage

Also worth reading

  1. next.js 16.5.0-canary.59 released
  2. next.js 16.5.0-canary.56 released
  3. Presentation: AI-Assisted Software Delivery: From Code to Production
  4. Qualcomm offers test drive of its rack-scale Nvidia AI challenger
  5. Type inference and narrowing with reverse arrows