Repository navigation
Permit the search tool Codex actually has - #34
Merged
Merged
Conversation
The production log names it: Tool call blocked by PreToolUse hook: Only web search is available in this review.. Tool: webrun That is this project's own refusal message. Codex calls its web tool `webrun`; the hook's allowlist held web_search, web_search_preview, browser_search, and search. None of them match, so the gate written to permit search denied every search for the entire life of the feature, in both attempts of that run, and said so in a log that was never surfaced. Both gates now decide by what a tool does rather than by a name somebody guessed. A researched run may use a tool that reads the web; anything able to act is refused in both modes, whatever it is called. The hook and the worker carry the same rule, and a test fails if the two ever drift, because a disagreement means a search is permitted and then terminated, or the reverse. The worker had the identical defect one layer down: its search matcher would have terminated the run as a tool attempt the moment a `webrun` item appeared, so fixing only the hook would have moved the failure rather than removed it. docs/SECURITY.md claimed PreToolUse never sees web search. The same log disproves it, and the claim is corrected rather than left standing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxxEQsJEXq9hZmjpNH5PxY
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
The production log, surfaced by the diagnostics added in #31:
That is this project's own refusal message. Codex names its web tool
webrun. The hook's allowlist heldweb_search,web_search_preview,browser_search,search— none of which match. The gate written to permit search denied every search, for the entire life of the feature, twice in that run alone, and reported it in a log nobody had surfaced.Every previous diagnosis in this chain was upstream of a block that was happening here.
Both gates now decide by behaviour, not by name
A researched run may use a tool that reads the web. Anything able to act is refused in both modes, whatever it is called.
webrun,web_search,web_search_call,browser_search,web_fetchshell,unified_exec,apply_patch,file_change,mcp_tool_call,read_file,list_dirmcp__server__search_filesweb_writeAn MCP tool whose name contains "search" still cannot borrow the allowance, and a tool that reads and acts is refused.
The worker had the identical defect one layer down
Its search matcher was
/web_search|web_fetch|browser_search/— so the instant awebrunitem appeared it would have terminated the run as a tool attempt. Fixing only the hook would have moved the failure, not removed it. Both now carry the same rule, and a test fails if they drift, because disagreement means a search is permitted then killed, or the reverse.Security doc corrected
#30 added a claim that
PreToolUsenever sees web search, sourced from documentation. Your log disproves it — the hook sawwebrunand refused it. Corrected, with the caveat that coverage varies by Codex version and the worker remains the control that makes a review hermetic.Tests
tests/core/tool-gate.test.tsruns the real hook as a subprocess against the real tool names:webrunis permitted in a researched run — the test that would have caught this on day one113 unit tests (112 pass / 1 Windows-only skip), mocked e2e, lint, build clean.
Generated by Claude Code