AI Joe
← Blog· Engineering Reality

AI Speedups Hide Bets You Never Agreed To

December 3, 2026

An AI that makes your function faster is also making silent promises about your data that nobody wrote down. The benchmark improves, the tests pass, the diff looks tidy. Then the codebase shifts around that fix and it breaks in a way nobody can trace.

The Details:

  • Human engineers who optimize code carry context that never made it into the repo: the bug from last spring, the customer with odd data, the reason records arrive sorted. That tacit knowledge brakes overconfident changes. AI assistants have no such history, so they optimize only what is visible in the prompt and the file in front of them.

  • The hidden bets are specific and common: a cache keyed on user ID assumes profiles never change, a loop that exits early assumes input stays sorted, a memoized helper assumes it never gains a side effect, an eager-load assumes dataset size never grows. Each works perfectly today and fails only once something downstream changes, which it eventually does.

  • Volume makes this worse than the old human version of the problem. A person could generate maybe one risky optimization a day, with context attached. An AI can generate a dozen in an afternoon, each with its own unstated assumption, none of them visible in the summary it gives you.

  • The fix is to make assumptions a deliverable, not an afterthought. Ask the AI to list every condition the new version depends on, then write a test that would fail if any of those conditions broke, and commit that test alongside the change. A fresh session with no prior context, asked to review the diff cold, often surfaces what the original prompt obscured.

Bottom Line: A speedup without a stated set of conditions is not an optimization, it is a bet you did not know you placed.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.