Skip to content

health: rollout_tool_call_failed counts an OpenCode grep/glob on a missing path as a harness failure #6374

Done

Description

@wprazuch

What happens

rollout_tool_call_failed (#5600) marks a rollout unhealthy when a non-completed grep or glob output opens
with ripgrep execution failed. The check reads that text as "the harness tool could not run".

OpenCode returns the same text when ripgrep is installed and works, but the call's path does not exist.
OpenCode runs ripgrep with the searched directory as its working directory, and a failed spawn is reported as
ripgrep execution failed (packages/core/src/ripgrep.ts, packages/core/src/tool/plugin/grep.ts).

So a model mistake (a made-up path) is counted as a harness fault, and one such call makes the whole rollout
unhealthy.

Evidence

A DeepSWE run (113 rollouts, Gym 03ee9743) had 3 unhealthy rollouts, all rollout_tool_call_failed, count: 1.
In each one:

  • the failed call searched a path that does not exist. A parallel ls of the same path in the same turn printed
    No such file or directory, or the directory listing from the same turn did not contain it;
  • other grep/glob calls in the same rollout, some in the same turn, returned matches, so ripgrep ran;
  • the agent continued, OpenCode finished normally and the patch was graded.

Without these three calls the run has 0 unhealthy rollouts.

Impact

Every OpenCode benchmark (DeepSWE, the SWE-bench variants) can fail a strict max_unhealthy_fraction because of
ordinary model path errors. The check was added to catch a sandbox without ripgrep (#6194), where every search
fails.

Proposed fix

In _rollout_tool_call_failed (nemo_gym/rollouts/health/checks.py), emit the finding only when the rollout
shows that the tool never ran: no grep/glob call in the same trajectory returned an output without a marker.
A missing ripgrep still fails every search and is still flagged. A single bad path next to working searches is
not.

Tests:

  • one failed grep (marker) and one grep with matches in the same trajectory: no finding;
  • every grep/glob call returns the marker: one finding, count = number of such calls (unchanged);
  • existing cases (completed bash quoting the marker, failed bash with the marker) keep their results.

Activity

  1. dundysm commented on Nov 22, 2026

    @dundysm
    Contributor

    i'll take this one; going with the proposed fix in _rollout_tool_call_failed (a marked grep/glob only counts when no grep/glob call in the same rollout returned a non-empty output without the marker), plus the tests listed here. pr coming shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions