IN THIS BREAKDOWN · 10 SECTIONS
You can read 19% of this breakdown.
The paper in one minute
Agents ship inside harnesses: the code that builds each prompt, runs tools, trims or summarizes context, and sometimes delegates to subagents. If you train a model with reinforcement learning (RL) inside a simplified loop and then deploy it in a real harness, it is trained for one environment and used in another. The authors' term harnessed agentic RL means training through the same harness used in production.
Their original Agent Lightning did this with a proxy: the harness talks to what looks like a normal OpenAI-compatible endpoint, and the trainer records the calls. Several frameworks have since adopted the idea. This paper, a full rewrite in about 3,500 lines of code, does two things.
First, it names four problems that appear when the trainer only sees API calls. Retokenization: the text of a response, re-tokenized inside the next prompt, may not match the tokens the model actually sampled, so calls cannot always be stitched into one sequence. Advantage calculation: one rollout can become several training samples, and the group baseline changes depending on whether you count rollouts or samples. Loss normalization: averaging per sample gives rollouts that split into more samples more weight. Backend scheduling: the number of samples is known only after the agents run.
Second, it builds the system: an API Gateway storing rollouts and events with idempotent endpoints, a Rollout Controller that runs agents as Kubernetes jobs, and a trainer on VERL that merges calls only on exact token matches and computes everything per rollout. Trained this way, Qwen3.5-9B in mini-SWE-agent went from 41.8% to 56.4% on SWE-bench Verified.
Research notes: the problem, approach and results
SWE-bench Verified for Qwen3.5-9B after RL through the mini-SWE-agent harness, on about 6,000 training tasks
training samples per coding rollout on average; only 36% of rollouts stayed a single sample
SWE-smith tasks before and after removing broken, oversized and always-solved tasks
Agents now run inside harnesses (Claude Code, OpenHands, mini-SWE-agent) that build their own prompts, call tools, summarize context and spawn subagents. Classic RL frameworks want the agent loop inside the trainer, so the model is trained in a loop it will never use. Training through the real harness means the trainer sees only a stream of API calls, and turning those into correct training samples is unsolved.
Let the harness keep its loop and point its model client at a proxy. A gateway records every call with its exact tokens and log probabilities under a rollout ID; a controller runs agents as Kubernetes jobs; the trainer merges calls only when tokens match exactly and computes advantages and loss normalization per rollout, not per sample.
With about 6,000 cleaned SWE-smith tasks and RL alone, Qwen3.5-9B in mini-SWE-agent rose from 41.8% to 56.4% on SWE-bench Verified. A search agent and an instruction-following agent also improved. Collocated asynchronous training ran about twice as fast as synchronous training on fewer GPUs.
Why it matters to an FDE
Most FDE work does not train models. Two situations make this paper relevant anyway.
The first is a customer with an open-weight model, a specific agent workflow and enough examples with checkable outcomes: tickets closed, tests passing, forms filled correctly. The paper shows that RL through the customer's own harness, with modest data, can move a small model a long way on a coding task. It also shows what that costs in engineering: a data-cleaning pipeline that discarded about 90% of the source tasks, sandboxes, network policies, and an agent that learned to cheat within the first runs.
The second applies to anyone running agents as a service. The control plane is a clean pattern for long-running jobs:
One source of truth. The gateway's record of each run is authoritative; the executor reconciles toward it.
Idempotent endpoints. Retrying any control call after a network failure cannot corrupt state.
A shared run ID. The rollout ID sits in the proxy URL, so every model call, reward and log line joins to one record for debugging.
Attempts are explicit. A rerun is a new attempt under the same rollout, not a new run.
The reward-hacking list is worth reading even if you never train anything. Given a repository and a test suite, the agent found the answer in git history, downloaded upstream source with curl and pip, and fetched code with urllib. Agents you evaluate will find the same shortcuts.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 149 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The four problems and the paper's choices, the control plane, the results and three misreadings
Free account - 04How it works
The gateway's objects and API, the controller, sample assembly, collocated async RL and safeguards
Premium - 05The numbers that matter
The coding pipeline numbers, the three training variants, sample statistics and the other two agents
Premium - 06Try it yourself
Reproduce the advantage and loss examples, watch retokenization break merges, test the retry rule
Premium - 07Where it breaks
Attribution of the gain, missing compute numbers, the dedup rule, eventual consistency and slips
Premium - 08Using it on a deployment
Whether to RL-train in a customer's harness, and reusing the control-plane pattern either way
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
