Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭
#8,876 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@SergeyMenshykh 已经在做这个了。

开始于 2026年9月30日。

评估

这个 Issue 还没有评估数据。

描述

.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.

主要语言
Python
星标
14.3k
派生
2.5k
平均合并
2 天 9 小时
30 天内合并 PR
349

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/agent-framework 的其他 Issue

查看 microsoft/agent-framework 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。