Repository navigation
Conversation
ssccinng
temporarily deployed
to
github-app-auth
October 25, 2026 05:46 — with
GitHub Actions
Inactive
ssccinng
temporarily deployed
to
github-app-auth
October 25, 2026 05:46 — with
GitHub Actions
Inactive
ssccinng
temporarily deployed
to
github-app-auth
October 25, 2026 07:26 — with
GitHub Actions
Inactive
ssccinng
marked this pull request as ready for review
October 25, 2026 07:40
ssccinng
temporarily deployed
to
github-app-auth
October 25, 2026 07:40 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Blank conversation IDs can omit the matching tool-call message and leave an orphan tool result in the model request.
1 open issue
What changed in this PR
This PR addresses #9656 by generating unanswered-approval results directly, avoiding dependency-provided wording that presents missing approval as a final human rejection.
Changes:
- Return generated approval decisions and call/result messages while preserving explicit human rejection behavior.
- Insert generated messages alongside approval decisions to maintain history ordering.
- Expand coverage for streaming, restored sessions, mixed decisions, history deduplication, and cancellation/retry behavior.
| File | Description |
|---|---|
dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/OpenFixApprovalResultTests.cs |
Adds default-stack checks for result wording, persistence, and fresh approvals. |
dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgent_ApprovalRetryTests.cs |
Covers canceled automatic rejections and retry after session restoration. |
dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ApprovalResponseBindingChatClientTests.cs |
Verifies generated call/result messages and interrupted streaming. |
dotnet/src/Microsoft.Agents.AI/ChatClient/ToolApprovalHelpers.cs |
Supports inserting generated messages with approval decisions. |
dotnet/src/Microsoft.Agents.AI/ChatClient/ApprovalResponseBindingChatClient.cs |
Generates missing-approval results directly and returns them to callers. |
Review effort: Balanced
ssccinng
temporarily deployed
to
github-app-auth
November 1, 2026 15:08 — with
GitHub Actions
Inactive
5 of 7 tasks
Collaborator
|
Thanks for the contribution ssccinng, however we reverted the change that caused this issue lower down the stack, so this workaround will not be required anymore. Closing this PR. Feel free to reopen if I missed anything. |
This branch was previously 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.

Motivation & Context
Unanswered tool approvals should explain that approval was missing without presenting the decision as a final human rejection. Empty or whitespace conversation IDs must also preserve matching assistant tool calls so providers do not receive orphan tool results.
Description & Review Guide
string.IsNullOrWhiteSpace. Cover null, empty, whitespace, and non-empty conversation IDs through streaming and non-streaming approval tests. Correct cancellation forwarding, an unnecessary import, and the static test field's requireds_prefix.Validation: The regression fails on the original commit and passes after the update (8 original failures; 20/20 focused tests now pass). The affected project unit suite passed 3471/3471 tests. Builds with warnings as errors, formatting, package creation passed.
Related Issue
Fixes #9656
AI Assistance
AI assistance details: Implementation, regression tests, analyzer corrections, and this description received AI assistance.
Contribution Checklist