ClawGym II:エージェントハーネスにおけるブラックボックス強化学習の探求
ClawGym II: Exploring Black-Box RL on Agent Harness
August 17, 2026
著者: Huatong Song, Fei Bai, Ming Yang, Renyuan Li, Jia Deng, Jujie He, Zhange Zhang, Daixuan Cheng, Yan Xing, Qi Yun, Xuxing Chen, Danyang Li, Feng Chang, Chuan Hao, Ran Tao, Jian Yang, Bryan Dai, Wayne Xin Zhao, Mingjie Tang, Ji-Rong Wen
cs.AI
要旨
エージェントハーネスは、エージェントと環境との相互作用を調整することにより、長期的タスクにおける性能を大幅に向上させてきた。しかしながら、複雑なハーネスを通じた強化学習は、そのような学習を長期的エージェントタスクへ拡張することに根本的な課題が伴うため、依然としてほとんど未開拓である。本研究では、複雑なハーネスを通じた汎用エージェントの安定的かつスケーラブルな最適化を実現する、統合的なブラックボックスRLフレームワークを提示する。具体的には、まずサンドボックスベースの実行基盤を構築し、タスク環境とハーネスを一時的なサンドボックス内に隔離することで、大規模な並行ロールアウトを可能にする。次に、方策最適化を不透明なハーネス実行から分離し、モデル境界にサービングプロキシを配置してモデル呼び出しを捕捉する。マルチターン軌跡の再構築と学習効率の向上のために、捕捉した呼び出しをプレフィックスツリーに整理し、さらにクリティックベースのPPOとクリティック不要のGRPOの双方を、復元されたツリー構造上の最適化に適応させる。同時に、最適化プロセス全体を通じて学習・推論の一貫性を維持する。最後に、ミックスハーネス学習を導入し、単一のモデルを異種ハーネスによって共同最適化できるようにする。Qwen3-30A3Bを用いた場合、ブラックボックスRLは、OpenClawおよびClaude Codeを通じて、ClawGym-BenchのPass@1をそれぞれ9.98ポイントおよび14.81ポイント向上させ、200~400の最適化ステップにわたって安定性を維持した。さらに、本フレームワークは、JobBenchやOfficeQAなど、より困難なタスクにおいても一貫した改善をもたらした。全体として、本フレームワークは、ブラックボックスハーネスを通じた汎用エージェントの効果的かつ安定的、スケーラブルな最適化を可能にし、異種実行システムにわたる統合的な学習を支援する。
English
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.