Relax tool-name allow-listing and improve tool-call detection/parsing across adapters and sieve#153
Merged
CJackHwang merged 4 commits intodevfrom Mar 22, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…issues Sync tool-call compat fixtures and update node test to match permissive tool-call policy
CJackHwang
added a commit
that referenced
this pull request
Mar 22, 2026
Merge pull request #153 from CJackHwang/codex/investigate-tool-execution-bugs-in-output-7ocr8f Relax tool-name allow-listing and improve tool-call detection/parsing across adapters and sieve
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.
Motivation
toolsschemas are malformed, empty, or whentool_choice=none, so tool payloads are still intercepted and emitted.<tool_use>variants and array payloads) and to detect tool calls when mixed with leading prose.Description
"__any_tool__") whentoolsare present but provide no valid names by addingensureToolDetectionEnabledand equivalent logic in the JS policy resolver.filterIncrementalToolCallDeltasByAllowedto preserve seen names and avoid blocking whenallowedNamesis empty, and adjusted formatting logic accordingly.ParseToolCallsDetailed/filterToolCallsDetailedand updated JS helpers to match."function"JSON keyword, and adjusted sieve keyword lists to catch more payload shapes.<tool_use>XML/markup styles inparseXMLToolCallsand helpers to extracttool_name/function_nameand parameter bodies.TestHandleClaudeStreamRealtimeDetectsToolUseWithLeadingProse).Testing
go test ./...coveringinternal/adapter/claude,internal/adapter/openai, andinternal/util, and they all passed.npm test/yarn test) for the stream-tool-sieve helpers and they passed.TestHandleClaudeStreamRealtimeDetectsToolUseWithLeadingProse, severalParseToolCallscases, and stream-tool-sieve node tests) to assert the new permissive parsing and they succeed.Codex Task