Context is king: how to cut AI agent token costs
Long agent runs cost more than the work feels worth because the Claude Messages API re-sends the whole history at every step, and past a point those tokens stop improving the answer. What caching does not fix, why the lever is where state lives, and a quick test to find the stage that leaks it.