agentscope-ai / agentscope-ai/QwenPaw
runtime: preserve partial state when async generator is closed
- Lingua principale
- Python
- Stelle
- 34.9k
- Fork
- 3.1k
- Merge medio
- 1g 15h
- PR unite (30g)
- 225
Descrizione
## Problem
Closing the runtime async generator through GeneratorExit skips the cancellation-state persistence path. Partial assistant output or tool state can be lost even though agent cleanup and the FINALLY phase still run.
## Expected behavior
GeneratorExit should persist the interrupted state once, re-raise GeneratorExit, avoid the ON_ERROR phase and error envelope, and still close the agent and run FINALLY once.
## Proposed scope
A focused runtime change plus a regression test for the generator-close lifecycle. No API or user-facing behavior changes.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.