Repository navigation
feat(harness_agent): add require_tool_call and keep the pre-gate reward - #5033
Merged
Merged
Conversation
With require_tool_call, a run whose response has no function_call or custom_tool_call item gets reward 0, so answering directly without using the harness earns nothing. The verifier's own score stays in harness_pre_gate_reward, so a gated zero can still be told apart from an unsolved task. Off by default. Signed-off-by: Christian Munley <[email protected]>
cmunley1
marked this pull request as ready for review
October 24, 2026 01:11
Contributor
Author
|
/ok to test 0012576 |
Contributor
Author
|
/review |
Signed-off-by: Christian Munley <[email protected]>
Contributor
Author
|
/ok to test 7cf15df |
Contributor
Author
|
/review |
svcnvidia-nemo-ci
left a comment
Contributor
There was a problem hiding this comment.
SHIP
LGTM — no reliability concerns. Reviewed the opt-in reward gate in HarnessAgent.run, its response/verifier contracts, and the regression coverage. The default behavior remains unchanged, and enabling the gate preserves the verifier score separately.
Static review only; tests and model smoke rollouts were not executed.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
cmunley1
added a commit
that referenced
this pull request
Oct 24, 2026
Resolves the conflict with #5033 (require_tool_call) in harness_agent run(): both config fields are kept, the tool-call gate runs on the verify result and a scored failure closes its sandbox after it. Signed-off-by: Christian Munley <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
On tasks a model can sometimes answer from memory, a harness run can return a direct answer without ever calling a tool, and
harness_agentscores it like any other run. In RL this rewards skipping the harness, which is the behavior these environments exist to train.Fix
A new
require_tool_calloption onHarnessAgentConfig, off by default. When it is on, a run whose response has nofunction_callorcustom_tool_callitem gets reward 0 after/verify.custom_tool_callcounts because free-form tools (for example Codex'sapply_patch) emit that item type.The verifier's own score is kept in
harness_pre_gate_reward, so a gated zero can still be told apart from an unsolved task when profiling or filtering data.osworld_agenthas a relatedrequire_tool_callagent option, which retries a model call until the reply contains a tool call. This change is the reward-side counterpart forharness_agent, applied to the whole run after verification.Test
responses_api_agents/harness_agent/tests/test_app.py::test_require_tool_call_zeroes_runs_without_tool_callscovers four runs: no output and a text-only answer get reward 0, afunction_callor acustom_tool_callkeeps the verifier's 1.0, andharness_pre_gate_rewardis 1.0 in all four.test_config_defaultschecks the option is off by default. All 35 harness_agent tests pass.