specific method · filed under inference & serving
Context folding
Context folding is a context-management strategy for long search-agent contexts that keeps the conversation within a length limit.1 Once the cumulative tool-response length reaches a preset threshold, earlier tool responses are pruned from the history.2
Trade-off A comparison in the passage shows it scoring lower on BrowseComp than a discard-all strategy.3
How this definition was written
Summarised by glm-5.3-flash from 1 source; every sentence is checked against the quote it cites.
most search agents built on our model adopt a simple context-folding strategy(256k
— Qwen/Qwen3.5-397B-A17B · Hugging Faceonce the cumulative Tool Response length reaches a preset threshold, earlier Tool Responses are pruned from the history to keep the context within limits
— Qwen/Qwen3.5-397B-A17B · Hugging Facesimple context-folding achieved a score of 69.0, while using the same discard-all strategy as DeepSeek-V3.2 and Kimi K2.5 achieved 78.6
— Qwen/Qwen3.5-397B-A17B · Hugging Face
Also called context-folding strategy, simple context-folding strategy(256k).