Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

.NET: A2A session save failures can mask agent execution exceptions

Đã đóng
#8,876 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@SergeyMenshykh đang làm issue này rồi.

Từ ngày 30/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

.NET a2a hosting reproduced
Description

A2AAgentHandler persists the agent session from a finally block after new-message and continuation runs. If the agent run throws and SaveSessionAsync also throws, the persistence exception replaces the original execution exception.

This can hide the actual agent failure or caller cancellation behind a secondary session-store failure.

Current behavior

Conceptually:

try
{
    await RunAgentAsync(...);
}
finally
{
    await SaveSessionAsync(...);
}

When both operations fail, callers observe the exception from SaveSessionAsync rather than the exception that caused the run itself to fail.

Expected behavior

Session persistence should still be attempted with an uncancelled token after a failed run, but a secondary persistence failure should not replace the already-propagating execution exception. When execution succeeds, a session save failure should continue to surface normally.

Scope

The affected paths are:

  • new-message non-streaming execution;
  • new-message streaming execution;
  • continuation execution.

The existing unit tests already verify that session persistence is attempted with CancellationToken.None when execution fails, which provides a focused place to add regression coverage for exception precedence.

Ngôn ngữ chính
Python
Star
14k
Fork
2.5k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
403

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/agent-framework

Tất cả issue của microsoft/agent-framework

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.