Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

LEGO-RL: New Framework Bridges Coding-Agent Harnesses with Scalable Reinforcement Learning

AI By Crimson AI Hugging Face Papers 19 August 2026 · 00:00 24 views
Share: X Telegram

Hugging Face researchers introduce LEGO-RL, a framework that enables policy-gradient training directly on native coding-agent harnesses, boosting performance of a sparse MoE model across three harnesses on SWE-bench Verified.

LEGO-RL: New Framework Bridges Coding-Agent Harnesses with Scalable Reinforcement Learning

Key points

Reinforcement learning (RL) for coding agents often depends on long-running agent harnesses that manage tool integration, repository contexts, and execution feedback. However, the native execution environments of these harnesses are inherently misaligned with policy-gradient training: environmental crashes and reward hacking can corrupt outcome signals, while train-inference discrepancies decouple rollout behavior from policy updates.

To address this, researchers from Hugging Face present LEGO-RL, a framework that bridges native coding-agent harnesses with scalable policy-gradient optimization without modifying their internal control flow. LEGO-RL is built on three pillars: faithful optimization via in-process LLM proxying, reliable execution via scalable sandbox orchestration, and observable training through an integrated monitoring plugin with a Live UI.

The framework was evaluated by training the sparse Mixture-of-Experts (MoE) model Qwen3.5-35B-A3B using GSPO across three native coding-agent harnesses. On SWE-bench Verified, LEGO-RL improved performance from 64.0% to 70.4% on OpenHands SDK, from 62.4% to 68.2% on Claude Code, and from 57.2% to 66.6% on OpenCode, while maintaining a rollout-training probability correlation above 0.99.

LEGO-RL is open-source, with all code, data, and models available on GitHub and Hugging Face.

HarnessBefore LEGO-RLAfter LEGO-RL
OpenHands SDK64.0%70.4%
Claude Code62.4%68.2%
OpenCode57.2%66.6%
Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 15 Oct 2026

New Survey Maps How Multimodal AI Agents Remember and Evolve

A Hugging Face survey proposes a two-axis framework for multimodal agent memory, separating how information is formed and represen...

11
Research paper
Hugging Face 15 Oct 2026

CriticOPD Fixes On-Policy Distillation by Letting Teachers Critique Student Errors

Hugging Face researchers introduce CriticOPD, a method that restores the teacher's ability to recover from student mistakes during...

9
Research paper
Hugging Face 15 Oct 2026

ActionOPD: Distilling Agent Decisions, Not Tokens

A new Hugging Face paper proposes ActionOPD, an action-level on-policy distillation method that aligns a student agent's decisions...

11