Self-Context plug-in pushes Qwen agents to 82% on Terminal-Bench
TL;DR
- Self-Context lifts a Qwen 3.8-27B agent to 82.0% on Terminal-Bench 2.1, +7.8 points over the vanilla harness with 31.8% fewer turns.
- Macro average across three agent benchmarks reaches 69.8% (+5.7 pp), with mean interaction turns dropping from 27.0 to 20.6.
- Across 255,208 logged operations, the agent's remove-to-add ratio is 0.88×, with 17.6% of operations editing existing graph nodes in place.
A new paper on Hugging Face proposes Self-Context, a layer that sits between a long-horizon LLM agent and its native harness and lets the model edit its own context as a working graph. On Terminal-Bench 2.1, a Qwen 3.8-27B agent running Self-Context scored 82.0%, +7.8 points over the vanilla harness, and reached the vanilla harness's final 74.2% success by turn 61 rather than turn 100.
The authors describe the system as a "graph-based plug-and-play framework between the LLM and its native harness," with two moving parts: a graph that records exploration attempts and their findings, and a mechanism that uses "fold and unfold to replace interaction history with summary notes" and restore the original history when needed. Across three agent tasks — Terminal-Bench 2.1 (89 tasks), BrowseComp-Plus (830 search tasks) and QwenClawBench v1.1 (100 working tasks) — the macro average landed at 69.8%, up 5.7 points on the vanilla baseline, with mean turns dropping from 27.0 to 20.6.
An ablation over 255,208 graph operations shows the agent actively curating rather than hoarding: "the ratio of remove to add is 0.88× (94,441 vs. 107,571)," and 17.6% of operations revise existing nodes in place. Code, a project page and a Hugging Face demo are posted alongside the paper.
It arrives in a busy week for harness-layer agent work on our agents tracker, including Microsoft's Freehand harness open-sourced the same day.
Originally reported by huggingface.co
Read the original article →Original headline: Self-Context Plug-In Lifts Qwen3.8-27B Long-Horizon Agents to 69.8% Macro and 82.0% on Terminal-Bench 2.1