Hacker News new | ask | show | jobs
by __natty__ 28 days ago
So it makes sense to first send stable prompt, reasoning and files content, tool calls summary and actual tool calls at the very end?
1 comments

The way you do this (and the way opencode does it) is you do most of your pruning in more recent history. Last I looked at opencode, they start pruning tool call results after 2 full agentic turns. So you probably dont get quite as good hits on cache for the most recent 1-5% of your turns, but after that everything else caches fine and those tool calls that likely aren't relavent to your session anymore are gone.