Skip to content

Answer without a tool when a harness request's only tools were provider-run - #60

Merged
dylanuys merged 1 commit into
stagingfrom
fix/harness-required-tool-choice
Nov 19, 2026
Merged

dylanuys merged 1 commit into
stagingfrom
fix/harness-required-tool-choice

Conversation

@dylanuys

Copy link
Copy Markdown
Contributor

What changed

Follow-up to #59, from its review. The harness request filter drops tools the provider would run itself. A request that required some tool (tool_choice="any") and offered only provider-run tools kept its required choice after they were dropped. ModelInput refuses a required choice with no tool definitions, so the request failed instead of being answered without a tool.

Such a request is now sent with tool_choice="none", the same as one that named a dropped tool. A request that named a dropped tool while other tools remain still becomes "auto".

Validation

  • The filter test now covers a required-choice request whose only tool is provider-run (accepted by ModelInput.from_inspect with tool_choice="none") and a forced provider-run tool alongside a sandbox tool ("auto"). It fails without the change with "required tool choice needs tool definitions".
  • pytest packages/yugos-evals/tests/test_harnessed.py passes (11 tests); ruff check and ruff format --check pass on the changed files.

🤖 Generated with Claude Code

…er-run

A request that required some tool (tool_choice "any") and offered only
provider-run tools kept its required choice after they were dropped, and
the router protocol refuses a required choice with no tools. It is now
sent with tool_choice "none", as a request that named a dropped tool
already was.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T05:21:07.855491Z 78f1259 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dylanuys
dylanuys merged commit f562d1e into staging Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant