I have a few variations of pruning (trimming all long tool outputs, agent-directed trimming, etc) in my aichat collection of session tools:
https://pchalasani.github.io/claude-code-tools/tools/aichat/...