Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#8,876 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@SergeyMenshykh ci sta già lavorando.

Dal 30/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Python
Stelle
14k
Fork
2.5k
Merge medio
1g 20h
PR unite (30g)
399

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/agent-framework

Tutte le issue di microsoft/agent-framework

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.