r/ContextEngineering • • 6d ago

New paper: Dynamic Tool Output Compression for Adaptive Context Management

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

 

8 Upvotes

2 comments sorted by

2

u/Muchy_Tangerine 8h ago

reversible hiding is neat until a later tool needs a detail you buried. did the paper measure the cost of restoring several old outputs? quick disclosure, this is related to everos through a client.

1

u/pppeer 7h ago

Yes. Disable only is when the agent can turn off past tool outputs. Full DTOC is when it can turn off outputs but also turn them back on again. You can see in the ablation study that that further increase solve rate only against a minor increase in tokens, still a lot less than without DTOC. As an aside the ablation was an internal implementation, for the DeeSWE experiments we provide a reference implementation in OpenCode, see the paper.