fix(core): persist state on call cancellation - #2820
Open
hanydd wants to merge 1 commit into
Open
Conversation
5 tasks
hanydd
force-pushed
the
fix/cancelled-call-state
branch
from
August 24, 2026 00:21
3a7d8c5 to
e1ca130
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
2.0.3-SNAPSHOT
Description
背景
#2799 已在模型调用报错时保存安全的对话状态,但 Reactor cancellation 不会进入异常处理,因此取消普通或 structured-output 调用时,本轮用户输入仍可能丢失。
另外,如果 reasoning 已经提交了 tool call,而 acting 或 middleware 在写入 tool result 前报错,直接保存会留下没有结果的
PENDINGtool call。本 PR 是 #2713 基于 #2799 的精简后续,只补充上述两个场景。
改动
PENDINGtool call。测试
mvn -pl agentscope-core -Dtest=ReActAgentCallFailurePersistenceTest testmvn -pl agentscope-core test2298 tests passed,8 skipped。
Checklist
mvn spotless:applymvn test)