ClawGym II: Exploring Black-Box RL on Agent Harness
Organizations: Gaoling School of Artificial Intelligence, Renmin University of China · IQuest Research
Abstract
Agent harnesses have substantially improved performance on long-horizon tasks by coordinating agent interactions with the environment. However, reinforcement learning through complex harnesses remains largely unexplored, as scaling such training to long-horizon agent tasks introduces fundamental challenges. In this work, we present a unified black-box RL framework for stable and scalable optimization of general agents through complex harnesses. Concretely, we first build a sandbox-based execution infrastructure that isolates task environments and harnesses within temporary sandboxes for large-scale concurrent rollouts. We then decouple policy optimization from opaque harness execution and place a serving proxy at the model boundary to capture model calls. To reconstruct multi-turn trajectories and improve training efficiency, we organize the captured calls into prefix trees and further adapt both critic-based PPO and critic-free GRPO to optimize over the recovered tree structure. Meanwhile, we maintain training-inference consistency throughout the optimization process. Finally, we introduce mix-harness training, allowing a single model to be jointly optimized by heterogeneous harnesses. With Qwen3-30A3B, black-box RL improves Pass@1 on ClawGym-Bench by 9.98 and 14.81 points through OpenClaw and Claude Code, respectively, while remaining stable over 200-400 optimization steps. Moreover, the framework yields consistent gains on more challenging tasks such as JobBench and OfficeQA. Overall, our framework enables effective, stable, and scalable optimization of general agents through black-box harnesses, supporting unified training across heterogeneous execution systems.
Figures & tables
| Model | Pinch- Bench | ClawGym-Bench | ||||||
| Product. & Collab. | Systems & Auto. | Analysis & Reason. | Content & Domain | Planning & Knowl. | Software Dev. | Avg. | ||
| OpenClaw as Harness | ||||||||
| Qwen3-8B | 54.50 | 37.46 | 29.06 | 30.40 | 41.12 | 44.47 | 30.69 | 35.02 |
| Qwen3-32B | 49.40 | 40.68 | 36.21 | 37.84 | 47.16 | 49.29 | 33.11 | 40.32 |
| Qwen3-30A3B | 55.60 | 42.47 | 42.09 | 45.04 | 51.95 | 45.98 | 46.24 | 45.11 |
| Qwen3-235A23B | 60.60 | 53.66 | 52.27 | 47.18 | 61.39 | 67.33 | 49.23 | 54.48 |
| Model | Product. & Collab. | Systems & Auto. | Analysis & Reason. | Content & Domain | Planning & Knowl. | Software Dev. | Avg. |
| White-Box AgentLoop as Harness | |||||||
| Qwen3-32B | 28.79 | 24.38 | 22.34 | 27.88 | 27.25 | 26.69 | 26.43 |
| Qwen3-30A3B | 44.22 | 35.93 | 36.85 | 39.76 | 49.55 | 48.09 | 41.69 |
| ClawII-OC-30A3B | 50.22 | 46.09 | 51.64 | 53.55 | 59.11 | 51.72 | 51.37 |
| WhiteBox-30A3B | 62.49 | 53.36 | 58.75 | 61.35 | 68.50 | 57.33 | 59.90 |
| OpenClaw as Harness | |||||||
Reinforcement Learning
Reinforcement learning studies how agents learn sequential decisions from rewards and interaction, balancing exploration, performance, safety, and adaptation.
See all 1,717 papers