Original Reddit post

How can we deal with growing context without resorting to irreversible, lossy compression approaches and memory management disconnected from the task at hand? In the paper below we present Dynamic Tool Output Compression, based on very simple idea: in every turn the agent can decide to hide or unhide certain tool outputs to focus context. Tool outputs are persisted seperately so that they can be enabled later on. Experiments on a sample of DeepSWE tasks, plus ablation experiments on internal data show that DTOC can save on tokens, steps and token cost, whilst improving solve rate, but results are model and task dependent. Looking forward to learn from who has used similar approaches, either practically, or also with formal benchmarking. Abhay Chaturvedi, Shreya Bhattacharya, Rashmika Gopalkrishnan, Peter van der Putten. DTOC: Dynamic Tool Output Compression for Adaptive Context Management in AI Agents. Discovery Science, October 5-9, 2026, Mainz, Germany Preprint: https://arxiv.org/abs/2609.26121v1 Reference implementation in OpenCode: https://github.com/chaturvediabhay24/opencode https://preview.redd.it/yfoj8tdxu7th1.png?width=1072&format=png&auto=webp&s=8a398ed89e8ce36ecef07e162d9289f3caf2f7ac submitted by /u/pppeer

Originally posted by u/pppeer on r/ArtificialInteligence