-
Notifications
You must be signed in to change notification settings - Fork 517
fix(bridge): cancel open tool calls on terminal error (#765) #781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
70031f4
fix: address issue #765
Wibias 2f6c031
test: add missing logs-api helper for claude tests
Wibias 39052f9
fix(anthropic): fail closed on EOF without terminal stop reason
Wibias 0197476
merge upstream dev and stabilize visibility poll CI test
Wibias c294df5
test(gui): revert visibility poll CI tweak; use dev test timing
Wibias 0bb36b6
fix(anthropic): drop unused sawContent stream flag
Wibias 16860ad
fix(anthropic): address CodeRabbit URL and tool-id review
Wibias ecd2205
sync: drop overlap already landed on tip for #765
Wibias ba740df
Merge remote-tracking branch 'upstream/dev' into fix/765-anthropic-ad…
Wibias 367ff85
fix(bridge): cancel open tool calls on terminal error (#765)
Wibias 2022b60
test(anthropic): group streamed tool-argument validation cases
Wibias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 7362
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 49612
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 20534
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 28073
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 38332
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 18444
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 44051
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 19747
Normalize malformed arguments on every incomplete tool-call path.
The failure paths at
src/bridge.ts:443andsrc/bridge.ts:1101expose malformed arguments, but failed responses are not replayed. The replay risk occurs whenmax_tokensends with an open tool call:src/bridge.ts:780callscloseCurrentToolCall()before emitting an incomplete response.src/bridge.ts:1253flushes the batch call as"completed"becausestopReasonis not included in the condition.rememberResponseState()cachesmax_output_tokensincomplete responses.If the truncated buffer is invalid JSON, the cached replay contains invalid
function_call.arguments. Use"{}"for unusable arguments infailCurrentToolCall()andflushToolCall(). Route open calls through the incomplete path whenstopReasonis"max_tokens"or"content_filter". Add streaming and non-streaming regression assertions forarguments: "{}".🤖 Prompt for AI Agents