Repository navigation
Keep provider-run tools out of harness sessions - #59
Conversation
Codex CLI declares web search as a tool its provider runs, and Claude Code's WebSearch tool requests one in a call of its own. A provider that offers it searched the live web from a sandbox that has no network. The harness request filter now drops tools the provider would run itself; the harness's own tools are untouched.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26613e6f1d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if isinstance(tool_choice, ToolFunction) and tool_choice.name not in {t.name for t in local}: | ||
| tool_choice = "auto" if local else "none" |
There was a problem hiding this comment.
Reset required tool choice when all tools are filtered out
When a harness request requires a tool with tool_choice="any" and offers only provider-run tools, filtering removes every tool but leaves the required choice unchanged. ModelInput.valid_request in packages/yugos/src/yugos/inference/chat.py explicitly rejects this combination with required tool choice needs tool definitions, so the request fails instead of receiving the intended tool-free answer. Normalize "any" to "none" when no tools survive, alongside the existing named-tool handling.
Useful? React with 👍 / 👎.
What changed
A harnessed question runs in a sandbox with no network, but a coding harness can still hand the model a tool that the model's provider runs on its own side:
WebSearchtool makes a separate model request whose only tool is a provider-run web search.With a provider that offers it, those requests searched the live web. Whether a session had web access then depended on the routed model's provider, not on the sandbox, and a search can find a task's published fix.
portable_request, the filter every harness request passes through, now drops tools the provider would run itself. A request that forced such a tool is answered without one. The harness's own tools are untouched: a harness tool that needs the network is still offered to the model and fails as it would on a machine without one.Validation
tool_choice="none"; a request with no provider-run tool is left alone. It fails without the change.pytest packages/yugos-evals/tests/test_harnessed.py packages/yugos/tests/test_inspect_router.pypasses (52 tests);ruff checkandruff format --checkpass on the changed files.🤖 Generated with Claude Code