Dev Tools · 1h ago
1913 Inventory Formula Reveals Optimal LLM Session Restart Timing
A developer analyzed 150 coding sessions to map LLM context costs onto the Economic Order Quantity (EOQ) formula from 1913. The model calculates the optimal session length to minimize API costs, factoring in cache hit/miss ratios and context growth. For Anthropic's Claude, the ideal restart point is around 40 turns with typical settings.
Meridian48 take
The analysis cleverly applies supply-chain math to LLM costs, but real-world variability in context growth and caching behavior may limit precision.
Read the full reporting
When Should You /clear? A 1913 Inventory Formula Has the Answer →
DEV Community
llm-cost-optimizationsession-management