A coding agent runs in isolated sandboxes while a training loop records tool-call tokens and hidden-test rewards
A coding agent runs in isolated sandboxes while a training loop records tool-call tokens and hidden-test rewards
+ Large Language Models News

Hugging Face shows loop-owning training for coding agents

Hugging Face demonstrated a TRL and OpenEnv workflow that trains on the tokens produced by a real OpenCode agent loop in remote sandboxes.

Hugging Face has published a concrete workflow for training a coding agent while the actual agent harness owns the loop.

The August 5 post uses TRL, OpenEnv, and the OpenCode harness. The core idea is “loop-owning”: OpenCode runs its normal tool loop in a sandbox, and TRL trains from the tokens the harness actually produced. The trainer does not drive a simplified copy of the agent interaction.

The setup has four main pieces. Each rollout gets an isolated OpenEnv session with its own filesystem and processes. A transparent proxy captures model calls with token IDs and log probabilities. A hidden-test verifier inspects the final workspace and returns a reward. When the harness finishes, TRL reconstructs training samples from the recorded turns and runs GRPO.

For the remote-sandbox example, Hugging Face runs Qwen3-8B through vLLM and uses Hugging Face Jobs to coordinate the components. The post calls out one operational catch: the trainer and vLLM can use localhost for weight sync, but remote sandboxes need a separate reachable sandbox-vllm-url.

Training the harness, not a copy of the harness

Most coding-agent training examples simplify the loop. The trainer samples actions, parses tool calls, runs tools, and feeds results back. That can teach a model a useful behavior, but it can also train against a loop that differs from the agent people actually run.

Loop-owning changes the unit of training. The harness remains responsible for the session. It chooses tools, writes files, reacts to observations, and stops when it is done. The trainer observes enough of that real interaction to apply reinforcement learning to the tokens that mattered.

That distinction matters for coding agents because the harness is part of the product. Tool schemas, sandbox behavior, filesystem state, hidden tests, retries, error messages, and stop rules shape the model’s behavior. Training outside that environment can miss the behaviors that actually make or break an agent session.

The demo is promising, not a benchmark

Hugging Face reports that a short run using Qwen3-8B over 32 problems moved reward from about 0.27 to about 0.71 over 10 steps, with noisy but upward movement. The post is careful about caveats: remote sandboxes add operational failure modes, and exposing vLLM to sandboxes through a quick tunnel is convenient for a demo but should be replaced with an access-controlled endpoint for serious use.

That makes the post useful as an architecture note rather than a leaderboard claim. It shows the pieces are open and composable: TRL, OpenEnv, OpenCode, remote sandboxes, transparent token capture, and hidden-test rewards.

Sources

The AI Feed Desk

The AI Feed Desk

Editorial desk

The AI Feed Desk tracks AI provider updates, model releases, agent tooling, and enterprise adoption, turning fast-moving announcements into source-linked context for builders and operators.

Noticed a typo, incorrect information, or translation error?

Tell us so we can fix it.

Help Improve This Article

Related Articles

A testing gauge compares a clean tool path with a longer tangled debugging path

Hugging Face measures whether tools are agent-friendly

Hugging Face's agent-focused benchmark tests whether software changes help coding agents finish tasks with fewer errors, tokens, and detours.

The AI Feed Desk

By The AI Feed Desk

Abstract code blocks pass through build and deploy checkpoints before meeting a harder behavior-validation maze

ScarfBench shows coding agents still struggle with Java migrations

IBM Research's ScarfBench tests whether AI coding agents can preserve behavior while migrating Java applications across enterprise frameworks.

The AI Feed Desk

By The AI Feed Desk

Three model-routing lanes on an operations table show low-cost, balanced, and fast AI work paths

OpenAI cuts GPT-5.6 Luna and Terra prices

OpenAI cut GPT-5.6 Luna pricing by 80%, Terra pricing by 20%, and added a faster Sol API mode for latency-sensitive work.

The AI Feed Desk

By The AI Feed Desk

A luminous Q-shaped data path runs between cloud infrastructure and modular open model weights

Alibaba releases Qwen3.8-Max with QwenCloud access and open weights next week

Qwen3.8-Max puts Alibaba back into the frontier-model fight with a large coding-focused model available through QwenCloud now and open weights promised next week.

The AI Feed Desk

By The AI Feed Desk

A transformer-shaped lens maps scattered data points into smooth density contours

Allen AI's DiScoFormer tests one transformer for density and score

The Hugging Face writeup frames DiScoFormer as a reusable estimator for density and score, with stronger high-dimensional results than kernel density estimation.

The AI Feed Desk

By The AI Feed Desk