What 1,068 published RL traces say about where agent time goes

A cached pipeline over Mercor's 1,068 published Terminal-Bench traces: where the agent-hours go, how agents fail, and how RL moved the 35B's failures into the environment.

The 3-hour wall: 1,068 published Terminal-Bench 2.1 trajectories plotted by wall-clock time for the 35B and 397B models before and after RL. Between 64% and 70% of agent-hours in each set went to trajectories that hit the 3-hour limit, and 4 of the 207 trajectories at the wall passed.

This is part 1.2 of the RL training series. See part 1.1 here.

Reading your eval traces is the step of the RL loop post-training teams skip most often, and trace reading is where the team behind Mercor's 397B RL guide found its worst harness bugs: a PowerPoint tool that returned `None` on every call, a PDF tool that flattened tables, packages missing from the sandbox. Fortunately, Mercor also published the traces. The Terminal-Bench 2.1 set holds 1,068 trajectories: Qwen3.6-35B and Qwen3.5-397B, each before and after RL post-training, three rollouts on each of 89 tasks.

Terminal-Bench is a benchmark for agents that work in a command line. Each task drops the agent into a sandboxed Linux container with an instruction, like building a project from source or fixing a broken environment, and the agent has only a shell to get the job done. When the agent stops, a set of tests checks the container's final state, and the trajectory passes only if every test does.

In part 1, I sorted the guide's fourteen lessons by whether they change with model scale. Trace reading landed on the scale-invariant side: the work is the same for a 35B policy and a 397B one, and it repeats at every checkpoint, so trace reading is a good place to start.

I read all 1,068 trajectories, or rather, I wrote a pipeline that reads them. The pipeline computes deterministic features for every trajectory (outcome, exception, wall-clock, tokens, tests passed versus total, error signatures in tool output) and then has Claude Sonnet 5.5 label every failed trajectory with one category from a fixed taxonomy. In this second part of the series, I'll show you which trajectories the agents' running time was spent on, how RL changed the way the models fail, and how to build the pipeline so that changing the taxonomy re-runs only the labels.

Two-thirds of the agent time went to runs that hit the 3-hour limit

By agent time I mean wall-clock time: how long each trajectory ran, as the harness recorded it. Add those times up over a set's 267 trajectories and you get the set's agent-hours, which is what the eval cost in sandbox time. The question here is which trajectories those hours were spent on.

Every Terminal-Bench run in this release has a 3-hour limit. An agent still working at three hours is cut off and graded on whatever it left behind, and that cutoff is what I'll call hitting the limit. The cutoff shows up in the traces as a pile-up: 145 trajectories end between 3:00 and 3:05, and only 6 end in the twelve minutes before 3:00. I count a trajectory as hitting the limit if it ran for at least 2 hours 58 minutes, and 207 of the 1,068 did. The harness records 204 of those 207 as "completed," not as timeouts, so their running time is the only place those runs show up.

SetTrajectoriesAgent-hoursHit the 3-hour limitOf those, passedAgent-hours in those runs
Qwen3.6-35B untrained267309640199 (64%)
Qwen3.6-35B trained267302641206 (68%)
Qwen3.5-397B untrained267164351107 (65%)
Qwen3.5-397B trained267194442136 (70%)

Put the four sets together and the split is lopsided. The 207 trajectories that hit the limit are a fifth of the trajectories and two-thirds of the 969 agent-hours, and 4 of them passed. The 662 trajectories that finished in under 30 minutes are three-fifths of the trajectories and 11% of the agent-hours. The image at the top of this post plots all 1,068 trajectories by how long they ran, and the runs that hit the limit are the band on the right.

The limit matters more for training than for evals. In a synchronous RL step, the slowest rollout sets the step time, and these traces put the median task's slowest-to-fastest rollout ratio at 1.6–2.2×. Waiting on stragglers is the problem SkyRL's fully-async trainer exists to solve, and the reason Mercor ran the trainer with in-flight weight updates "to minimize the effect of stragglers." What the traces add is that the stragglers are mostly not slow successes. Of the 227 trajectories still running at the two-hour mark, 9 passed.

The most common failure is declaring victory

Sonnet's labels put "false completion" first in every set: the agent says the task is done, and the tests disagree.

SetFailedFalse completionWrong approachTool or harnessBudget exhaustedNear miss
Qwen3.6-35B untrained1488919111312
Qwen3.6-35B trained131551438108
Qwen3.5-397B untrained132741623215
Qwen3.5-397B trained11960152498

A typical false completion, in the labeler's words: the agent "declared all deliverables complete and 'ALL TESTS PASSED' based on its own R test function (KS p=1.0000 is suspiciously perfect)," but the sample files the agent was graded on were written an hour before it rewrote the code and never regenerated. RL reduced false completions in both models (89 → 55 for the 35B, 74 → 60 for the 397B), roughly the direction you'd expect a pass-fail reward to push.

After RL, the 35B's failures moved into the environment

The column that jumps is "tool or harness" for the 35B: 11 failures before training, 38 after. The same column for the 397B barely moved (23 → 24).

Animated bar chart of failure labels for Qwen 35B and Qwen 397B, morphing from before RL to after RL with the before-RL bars kept as dashed outlines. 35B: false completion 89 to 55, tool or harness 11 to 38, wrong approach 19 to 14, budget exhausted 13 to 10, near miss 12 to 8. 397B: false completion 74 to 60, tool or harness 23 to 24, wrong approach 16 to 15, budget exhausted 2 to 9, near miss 15 to 8.
One label per failed trajectory, from run uz7dpptghk6vxnk625wv. The 35B's tool-or-harness failures more than tripled after RL; the 397B's went from 23 to 24.

The deterministic features agree. The untrained 35B set has 3 errored trajectories; the trained set has 14 errors and 4 agent timeouts, with `NotFoundError` from the model endpoint after hours of work, `VerifierTimeoutError`, and terminals that stopped echoing input even after Ctrl-C.

I don't know why the trained run hit more of these errors, and the traces alone can't say whether the cause is the policy (longer, more aggressive command sequences) or the infrastructure on the day the eval ran. Either way, those 38 trajectories count as model failures in pass@1, which is a deliberate and documented choice in the dataset card ("Errored rollouts count as failures"). During training the same errors would be masked, and the recipe's masking rule drops a whole prompt group on any error. In both cases, the compute is already spent.

Binary reward hides near misses

Between 14 and 31 failed trajectories per set passed at least three quarters of their tests. One wrote `79566` where the expected answer was `79586`. Another passed correctness and 5 of 10 speedup cases, then spent an hour polling a hung `pip install cython | tail -3`. A pass-fail reward scores these near misses the same as a trajectory that never started, which is defensible for a benchmark and expensive for learning.

The environment trips up every model

A regex pass over tool output, before any labeling, finds that between a third and a half of the trajectories in each set hit a Python traceback, 32–45% hit "command not found," and 18–27% hit a missing module. Terminal-Bench is partly a test of environment setup, for every model in every set.

How the pipeline works

The code is in `agentic_rl_evals/trace_audit.py`. The pipeline has four tasks:

Copied to clipboard!
traces = await fetch_set(repo_id, trace_set)            # cache="auto": download once per set
feats, digests = await featurize(trace_set, traces)     # cache="auto": every trajectory, no LLM
chunks = [digests[i : i + 20] for i in range(0, len(digests), 20)]
labels = await asyncio.gather(*(classify_chunk(c, classifier) for c in chunks), return_exceptions=True)

The classifier itself is a task input:

Copied to clipboard!
class Classifier(BaseModel):
    """The LLM labeler is an *input*: change any field and only the labels re-run."""

    model: str = "claude-sonnet-5-5"
    prompt_version: str = "v1"
    taxonomy: list[str] = ["env_setup", "tool_or_harness", "budget_exhausted", "wrong_approach",
                           "near_miss", "false_completion", "gave_up", "grader_suspect"]

Making the classifier an input is the property I cared about most, because a taxonomy is never right the first time. Adding a category, changing the prompt or switching the model re-runs `classify_chunk` and nothing upstream of it. Each LLM call inside a chunk is wrapped in `@flyte.trace`, so a chunk that fails halfway through and retries replays the calls it already paid for.

The driver writes its summary as a Flyte report on the run, so every number in this post can be read off the run itself, next to the actions that produced it:

The trace-audit run in the Union console. Left: the run tree with the Qwen3p6-35B_untrained_traces group expanded, where fetch_set (0.13 s) and featurize (0.17 s) carry cache icons and eight classify_chunk actions ran for 14 to 18.5 s each. Right: the Reports tab showing the Trace audit table.
Run uz7dpptghk6vxnk625wv in the console. In each trace-set group, the download and the features came from cache and only the label chunks ran. The report the driver wrote is on the right.

I tested the caching more than I meant to. My first three labeling runs failed on credentials (a stale API key on our demo cluster, then a secret name that resolved differently inside the parent task's container than on my laptop). Each rerun reused the cached downloads and the 1,068-trajectory featurization and only re-attempted the labels. The local copy I pulled for a sanity check, by contrast, hit Hugging Face's rate limit halfway through 1,074 files.

The run behind this post shows the same split between cached work and new work. The run's downloads and features came back from cache in a fraction of a second each, and nearly all of its 26 seconds went to the labels:

Animated replay of every action in run uz7dpptghk6vxnk625wv on its real timestamps, 26 seconds compressed to about 6. Four downloads and four featurize actions return from cache in about 0.1 seconds each near the 5-second mark; 28 label chunks then run for roughly 10 to 18 seconds each, with 530 traced LLM calls, one per failed trajectory, inside them. Counters show cache hits reaching 8 of 8, label chunks 28 of 28 and LLM calls 530 of 530.
The trace-audit run replayed on its real timestamps. Gray returned from cache; blue ran. Changing the classifier would re-run only the blue rows.

What I'd do with these findings on a training run

  • Stop rollouts earlier than the 3-hour limit. On these traces, 9 of the 227 trajectories still running at two hours passed, which makes a shorter cutoff a candidate for an early-termination rule in training (measured against these numbers first).
  • Separate infrastructure failures from policy failures before they reach the reward. Mercor's own guide says "classify every remaining error." A labeled trace set is how you find out which errors are left.
  • Look at the near misses. If 20–30 trajectories per eval pass three quarters of their tests, a partial-credit reward is worth an ablation.

The APEX-Agents 480 traces from the same release are larger (about 22 GB compressed across 12 tarballs), and those traces are my next run: the pipeline runs on them unchanged once you have access to the dataset.

Recap

  • Which runs the time is spent on: in every set, 64–70% of agent-hours went to trajectories that ran until the 3-hour limit cut them off, and 4 of those 207 passed.
  • How agents fail: false completion leads in every set, and RL reduces it.
  • What RL changed: the trained 35B's failures shifted toward the environment (11 → 38 labeled tool or harness), which pass@1 counts against the model.
  • What the reward misses: 14–31 failed trajectories per set passed most of their tests.

Try it

Copied to clipboard!
git clone https://github.com/unionai/unionai-examples
cd unionai-examples/v2/tutorials/agentic_rl_evals
flyte run trace_audit.py audit --classify false   # features only
flyte run trace_audit.py audit                    # + LLM failure labels (needs ANTHROPIC_API_KEY)

Full walkthrough in the docs tutorial.

Traces can tell you the environment is failing the agent, but not what those failures cost you. In part 3, I'll make the harness a versioned input, run a real Claude agent on a broken and a fixed version of it, and measure what the bugs cost in pass@1.

View full code on GitHub →
Sign up

30 day free trial

Try the devbox
No items found.