Notes on things I’ve built and broken.
Renovate had a cache built to avoid cloning repositories, and cloned them anyway, partly in order to write the cache. A series of small PRs cut clones on the hosted app by 40 to 50 percent, almost none of which made anything faster.
A tool loop re-sent every page it had scraped on every model call, so cost grew with the square of the loop length. It surfaced as context-limit failures and dollar-a-call queries. Three waves of fixes over three weeks, only one of them mine.