Stanford Researchers Introduce TRACE: A Skill-Oriented Agentic Training Program That Turns Repeated Agent Failures into Artificial RL Environments

Agent LLMs tend to fail the same way, over and over again. A team of Stanford researchers tracked this down to non-existent, renewable energy. Their system, TRACEdiagnoses those spaces and their trains directly.
TRACE represents Turine Rwhat is happening Agent failure in between Ctarget training Ethe environment. Released as open source under the MIT license.
What problem does TRACE solve?
To understand design, first consider why agents fail. They don’t have certain skills that jobs require, such as getting the right record or confirming a precondition.
Two common corrections to spending are miscalculations. Direct RL or SFT offers small rewards that can tell which skill was missing. Extensive synthetic data is not intended, so the budget flows to the capabilities the model already has.
However, TRACE recognizes that failure is not just random. A subset of deficits accounts for many failed trajectories. Therefore, each repeated deficit can be its own dense, validated training signal.
How does TRACE work?
Given those findings, TRACE uses an automated four-step pipeline. Each step is run by an LLM agent following the download command.
Step 1: Analysis of contrast power
The primary agent produces a release at the target site. The analysis agent divides them into successful and failed sets. It then labels all trajectory-capability pairs as NA, PRESENTor LACKING.
A skill is only saved if it is unique and has high cover. Specifically, its differential gap must clear δ = 0.20 and coverage must clear ρ = 0.10. Therefore, this pipeline preserves skills where its absence leads to failure.
Step 2: Targeted environmental integration
Next, the generation agent creates one virtual environment for each stored skill. Each area isolates a single capability while preserving the target tool’s schema and format.
Work conditions are generated procedurally from a random seed. Because the generation and validation is algorithmic, the awards do not require human labels or an LLM judge.
Step 3: Power adapter training
Then each skill gets a LoRA (Low-Rank Adaptation) adapter, trained in its own artificial environment. The training algorithm is GRPO (Group Relative Policy Optimization). The basic model remains frozen everywhere.
GRPO groups are issued with a shared seed, so conditions are the same within a group. The premiums are then normalized within each group to differentiate the policy contribution.
Step 4: MoE structure with token level routing
Finally, TRACE aggregates the adapters into a Mixture-of-Experts (MoE) model. The backbone and adapters are always frozen, and only lightweight token gates are trained.
Assuming, each token is moved up-1 to one power adapter. This allows the model to change experts midway.
Interactive Descriptor
TRACE evaluates the skills the agent lacks, creates one verifiable field for each field, trains each LoRA expert, and distributes tokens to all experts. Enter the pipe below.
1 · Cross Capability Analysis
Split the output into pass/fail, and keep spaces between them.
It is maintained if Δ ≥ 0.20 and Cov ≥ 0.10
2 · Targeted Environment Synthesis
One seeded, automatically validating field is generated for each skill.
3 · Power Adapter Training (GRPO)
Extraction shares the seed; Awards are usually made in the group.
🔒 Base model frozen · Δc updates only
4 · Formation of MoE · Token Level Route
A read gate moves each token up-1 to one skill specialist.
Select the activity above to transfer their tokens.
Result · τ²-Bench overall pass rate (Qwen3-30B-A3B)
Directed training and MoE formation defeats rapid optimization and one-adapter foundations.
What skills have you acquired?
In fact, for τ²-Bench, cross-analysis returned four deficiencies. These were systematic data analysis, multi-step task completion, precondition validation, and tool drive precision.
Remarkably, this finding remained stable across ten independent runs. Structured data visualization alone accounts for the largest share of failed operations. Completion of the multi-step task was followed closely.
Use cases with examples
To reduce these problems, consider three practical tasks. Each map points to a different failure mode identified by TRACE.
- First, hire a customer service airline agent. The user requests to cancel the base flight booked 14 days ago. Precondition validation checks policy validity before making a call
cancel_reservation. - Next, consider a combined sales pitch. The user requests to cancel two reservations and modify the third. Multi-step task completion stops the agent from stopping after the first subtask.
- Finally, consider the code agent in SWE-bench Verified. Finding a related task or file is a skill. It is necessary to fix a bug or update the API call.
How do the results compare?
With those trained skills, TRACE was tested on two backs and two measurements. τ²-Bench measures the pass rate of customer service across 50 airlines and 114 sales functions. Certified SWE-bench Pass@1 ratings on 500 original GitHub issues.
| The backbone | The way | τ²-Total Benchmark (%) | SWE-bench Verified Pass@1 (%) |
|---|---|---|---|
| Qwen3-30B-A3B | The foundation | 32.9 | 26.0 |
| GEPA (immediate improvement) | 39.6 | 31.0 | |
| SWE-RL | – | 32.6 | |
| Single Capability GRPO (Ours) | 40.3 | 36.6 | |
| TRACE (Ours) | 48.2 | 41.0 | |
| Qwen3.6-27B | The foundation | 50.0 | 68.0 |
| GEPA (immediate improvement) | 53.0 | 69.6 | |
| SWE-RL | – | 70.4 | |
| TRACE (Ours) | 59.1 | 73.2 |
For Qwen3-30B-A3B, TRACE improved τ²-Bench by +15.3 points and SWE-bench Confirmed by +15 points Pass@1. It beat out strong foreign benchmarks, GEPA and SWE-RL, by +8.6 and +8.4 points.
In addition, TRACE is sample-efficient. It consumes less than one in four emissions, exceeding the GRPO and GEPA endpoints. Its final accuracy ran +10.4 and +8.6 points up τ²-Bench. Additionally, a third benchmark, ToolSandBox, showed the same pattern.
With Qwen3.6-27B, TRACE achieved 73.2% Pass@1 on SWE-bench Verified. That open-weighted 27B model surpassed GPT-5.2-Codex (72.8%), GLM 5, and Claude 4.5 Sonnet on the public leaderboard.
Implementation
For AI experts, the pipeline is benchmark-agnostic and driven by benchmarking instructions. After the environments are generated, each power adapter is trained against a running vLLM server.
MODEL="Qwen/Qwen3-30B-A3B-Instruct-2507" # set your backbone
NAME="structured_data_reasoning" # set the capability
N_GPUS=4
# 1 — serve the frozen base model, with LoRA hot-swapping enabled
export VLLM_ALLOW_RUNTIME_LORA_UPDATING=True
vllm serve "$MODEL" --port 8000 --tensor-parallel-size 4
--enable-lora --max-loras 2 --max-lora-rank 32
--enable-auto-tool-choice --tool-call-parser hermes # qwen3_xml for Qwen3.6
# 2 — train one LoRA adapter per capability with GRPO
export VLLM_BASE_URLS=
torchrun --nproc_per_node="$N_GPUS" --master-port=29501 -m train
--game "capability_$NAME" --model "$MODEL"
Each LoRA adapter adds ~1.6B trainable parameters, or 5.3% of the backbone. The trained MoE gate adds just 491,760 parameters in total. The default thresholds are ρ = 0.10, δ = 0.20, and a constant of 8-of-10 runs.
Key Takeaways
- A mismatch of failures is possible. Comparing successful and failed trajectories reveals coachable deficits, not generic error labels.
- The target areas work well with the sample. Each confirmed location awards one skill, so every release carries a dense signal.
- Bits of writing are folding. Different experts with a token level route beat a single leading adapter by seven points or more.
- Training beats appreciation. Trained adapters scale monotonically, while rapid development plateaus only after four skills.
- Model 27B topped the leaderboard. Qwen3.6-27B scored 73.2% Pass@1 on SWE-bench Verified, more than GPT-5.2-Codex.



