fix: preserve signed tool approval metadata across approval responses - #16592
Merged
Conversation
This comment was marked as spam.
This comment was marked as spam.
Collaborator
Author
|
@rpelevin plesae turn off your ai response bot |
Contributor
|
🚀 Published in:
|
This was referenced Jul 6, 2026
Closed
gr2m
added a commit
that referenced
this pull request
Jul 6, 2026
…sponses (#16796) Backport of #16592 to `release-v6.0` (clean cherry-pick). `chat.ts` dropped the signature/metadata by reconstructing the approval object; v6 supports signed tool approvals. Part of the v6.0 backport tracking issue #16767. --------- Co-authored-by: Lars Grammel <lars.grammel@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Background
Signed human-in-the-loop tool approvals failed on resume because the UI helper discarded the server-issued approval signature when recording a user decision.
Summary
Updated addToolApprovalResponse to append approved/reason onto the existing approval envelope instead of replacing it, preserving signature and isAutomatic metadata.
Testing
Kept the focused regression test in packages/ai/src/ui/chat.test.ts that verifies signed approval metadata survives the approval-requested to approval-responded transition, and added a patch changeset for ai.
Related Issues
Fixes #16334