Skip to content

.NET: Keep resilient tool-call snapshots consistent - #9080

Open
King Star (jstar0) wants to merge 1 commit into
microsoft:mainfrom
jstar0:fix/9033-tool-call-recovery-boundary
Open

King Star (jstar0) wants to merge 1 commit into
microsoft:mainfrom
jstar0:fix/9033-tool-call-recovery-boundary

Conversation

@jstar0

Copy link
Copy Markdown
Contributor

Motivation & Context

With resilient background hosting, a non-workflow agent session can be saved after a function_call output item completes but before its matching tool result is appended to the session. If the process exits in that interval, recovery restores an unmatched call and the next Responses request fails with No tool output found for function call. This makes recovery fail during a normal tool-heavy turn.

Description & Review Guide

  • What are the major changes? Track emitted function-call IDs until matching function_call_output items complete. Skip incremental and final session saves while any call remains unresolved. Add unit tests for parallel calls with sequential results and for an unanswered call.
  • What is the impact of these changes? No public API changes. Resilient non-workflow snapshots wait until calls are paired; workflow checkpoint saves and non-resilient behavior remain unchanged.
  • What do you want reviewers to focus on? Verify that the stream item types and call IDs accurately represent completion, especially for parallel calls, and that workflow checkpoint behavior remains unchanged.

Related Issue

Fixes #9033

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@agent-framework-automation agent-framework-automation Bot added the .NET Usage: [Issues, PRs], Target: .Net label Oct 5, 2026
@jstar0

Copy link
Copy Markdown
Contributor Author

Could a maintainer approve the fork CI runs for this PR? Both dotnet-build-and-test and dotnet-format finished with action_required and no jobs on the current head; license/cla and the label check are green. Thanks.

This branch was successfully deployed

No deployments
github-app-auth — 2605ce6d Deployed Oct 5, 2026 by jstar0 via team_check #6085
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

2 participants