ClawLoop: Self-Improving Agents via Harness-Native Training Loop
Organizations: Meituan, China · Peking University
Abstract
The rapid advancement of Large Language Models (LLMs) has driven their deployment toward general-purpose harness environments, where LLM-based agents operate in sandbox workspaces and interact directly with file systems and shells. While numerous post-training pipelines exist for tool-use agents, their counterparts for harness-based agents remain scarce and are predominantly one-shot and teacher-dependent: a stronger external model synthesizes tasks and collects trajectories, the target agent is trained once, and evaluation results are consumed by human researchers rather than fed back into the loop. Such pipelines are inherently bounded by the capability of the external model and the scope of human prior, leaving no room for self-improvement. To address these limitations, we propose ClawLoop, a framework that enables self-improving without any external teacher model and with minimal prior dependencies. ClawLoop composes three phases into a self-sustaining cycle: Task Synthesis, which generates a diverse pool of training tasks via two complementary construction routines, applies diagnosis-conditioned difficulty growth followed by both agent-free and agent-based task validation; Training, which updates the agent via SFT and/or RL; and Diagnosis and Feedback, which analyzes the agent's rollout behaviors to produce a capability analysis report that will be used as feedback for task synthesis in the next iteration. Using Qwen3.6-27B as the loop model, ClawLoop yields consistent improvements on SkillsBench, Claw-Eval-Live, and ClawGym-Bench. The iteratively refined tasks are further transferred to smaller-scale Qwen3.5-4B and 9B models with gains across all benchmarks, validating data quality independently of the loop model.
Figures & tables
| Benchmark | Base | ClawGym | ClawLoop |
|---|---|---|---|
| SkillsBench (Avg 5) | 46.3 | 52.6 | 57.2 |
| Claw-Eval-Live (Avg Score) | 69.3 | 74.6 | 76.9 |
| ClawGym-Bench (Avg Score) | 67.6 | 61.9 | 68.4 |
| Scale | Model | Teacher | Training | SkillsBench | Claw-Eval-Live | ClawGym-Bench |
|---|---|---|---|---|---|---|
| Algorithm | (Avg 5) | (Avg Score) | (Avg Score) | |||
| 4B | Qwen3.5-4B (Base) | — | — | 5.8 | 32.4 | 33.0 |
| ClawGym | MiniMax M2.5+GLM-5.1 | SFT | 6.2 | 36.8 | 34.6 | |
| ClawLoop | None | RL | 8.4 | 48.0 | 44.1 | |
| 9B | Qwen3.5-9B (Base) | — | — | 6.4 | 58.3 | 32.0 |
| ClawGym | MiniMax M2.5+GLM-5.1 | SFT | 6.7 | 64.3 | 35.3 |
| Benchmark | Capability only | Domain only | ClawLoop |
|---|---|---|---|
| SkillsBench | 54.5 | 55.9 | 57.2 |
| Claw-Eval-Live | 73.2 | 70.1 | 76.9 |
| ClawGym-Bench | 67.2 | 67.8 | 68.4 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Workload | Wall-clock (h) | GPU hours |
|---|---|---|
| Task synthesis (1,024 tasks) | 15.98 | 511 |
| Validation rollouts on | 30.76 | 984 |
| Training — SFT | 8.03 | 257 |
| Training — GRPO | 18.52 | 593 |
| Diagnosis rollouts on | 0.94 | 30 |
| Total per iteration | 74.23 | 2,375 |
| Hyperparameter | SFT | GRPO |
|---|---|---|
| Loop-level settings | ||
| Iterations ( ) | 3 | |
| Tasks synthesized per iteration | 1,024 | |
| Rollouts per task ( ) | 8 | |
| Admission band ( , ) | 1, 5 | |
| Optimization settings | ||
| Quantity | |||
| Candidates synthesized | 1,024 | ||
| Passed agent-free validation | 897 | 910 | 913 |
| Passed agent-based validation | 672 | 469 | 567 |
| Admission rate (%) | 65.6 | 45.8 | 55.4 |
| SFT trajectories retained | 1,978 | 892 | 1,694 |
| Mean trajectory turns | 5.6 | 11.4 | 8.7 |
| Phase | Instance A (harder) | Instance B (easier) |
|---|---|---|
| Explore | A1–A5: read requirements, output contract, both CSVs, config, and six skill files | A1: read both CSVs and five skill files |
| Implement | A6: write generation script | A2–A3: create output directory, write script |
| Execute | A7: run script | A4: run script |
| Verify | A8–A13: recompute aggregates independently, dump and re-read all three outputs, cross-check tier totals against the distribution report, audit sort order | A5: read back all four outputs |
| Finalize | A14–A15: remove scratch script, report | A6: report |
| Quantity | Instance A | Instance B |
|---|---|---|
| Difficulty score | 0.53 | 0.14 |
| Agent turns | 15 | 6 |
| Tool calls | 24 | 14 |
| Shell executions | 9 | 2 |
| Skill files consulted | 6 | 5 |
| Reasoning tokens | 67,994 | 4,067 |
LLM Agent Training
Large language model agent training teaches models to plan, use tools, and learn from multi-step interaction with environments.
See all 564 papers