DeLoop: Repeated Actions as Self-Supervision for Long-Horizon Agents
Abstract
DeLoop is a self-supervised preference optimization method that reduces repetitive tool-use loops in language-model agents by learning from their own rollouts, improving efficiency and success under context compression.
Language-model agents that run long tasks often redo work they have already done: they re-issue a tool call they made earlier and get back exactly the same observation, a step that adds no new information. We identify this failure as a loop. Loops appear natively in Qwen, Llama, and Gemini agents and become far more common once the agent's history is compressed to fit its context window. To reduce these loops, we propose DeLoop, a self-supervised training method. DeLoop builds on a simple observation: the agent's own rollout can provide the supervision needed to learn from its loops. We use a looping action as a negative example and the first later non-looping action in the same rollout as a positive example. DeLoop learns from these pairs through direct preference optimization and does not require task rewards, gold answers, or LLM judges. On CodeGym under compression, DeLoop reduces the share of Qwen3-8B tasks containing loops from 57.3% to 6.1%. It also uses about one third as many steps per task, with similar task success. On Qwen3-32B, DeLoop reduces loops and steps while raising task success from 37.7% to 44.8%.
Community
TL DR: LLM agents often re-issue a tool call they already made and get the same observation back. We call this a loop. DeLoop turns each loop into a free training pair from the agent's own rollout: the repeated call is the rejected action, and the agent's first later loop-breaking action is the chosen one. We train on these pairs with DPO. No task reward, gold answer, or LLM judge needed.
Why it matters: loops get much worse when the history is compressed. On CodeGym, Qwen3-8B loops in 29.0% of runs with the full history and in 57.3% under summarization. Summaries that explicitly track past actions don't fix it, because the agent often ignores a record it already has.
Results
- Qwen3-8B on CodeGym: loop rate 57.3% → 6.1% (9.4×), steps per task 15.0 → 4.7, tokens −47%, with similar task success
- Qwen3-14B / 32B: task success +7.2 / +7.1 points (45.1 → 52.3, 37.7 → 44.8)
- With cross-domain pairs (DeLoop-Mix): Qwen3-8B success 25.1 → 30.3. Loops also drop under 7 memory policies, in ALFWorld, Open-AgentRL, AppWorld, ScienceWorld, and BrowseComp-Plus (22.4% → 1.2%)
🔗 Project page (with an interactive example of a loop forming): https://cskyl.github.io/deloop/
📄 arXiv: https://arxiv.org/abs/2610.19376
💻 Code and data: coming soon at https://github.com/cskyl/deloop
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents (2026)
- DeltaTTG: Training Multi-Turn Agents with a Token-to-Go Progress Meter (2026)
- ReFold: Training-Free Reversible Inter-Turn Context Folding for Long-Horizon Agents (2026)
- Don't Mask the Environment: Observation Supervision Changes How Agents Explore Under RL (2026)
- Does Learning to Predict the World Help Agents Act? Auditing World-Model Post-Training (2026)
- Self-Credit: Credit Assignment for Long-Horizon Agentic RL via Intra-group Rescaling (2026)
- Prune the Summary, Not the History: Source-Judged Compaction for Long-Horizon Agents (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2610.19376 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper