agentscope-java icon indicating copy to clipboard operation
agentscope-java copied to clipboard

[Bug]:agentscope-copilotkit中connect历史消息重放时重复激活前端中断UI

Open shenghuitian opened this issue 3 months ago • 1 comments

实时消息流式输出时,需求澄清表单提交后,需求澄清工具呈现 Done 状态,后续正常输出回复: Image

历史消息重放时,需求澄清工具呈现 Running 状态: Image

重放时重复激活前端中断UI,需求澄清表单出现在历史消息末尾,并且呈现【未提交】状态: Image

shenghuitian avatar Aug 30 '26 13:08 shenghuitian

Issue Evaluation

Category: bug | Area: area/ext/integration (copilotkit / AG-UI replay) | Status: Confirmed

Root Cause: History replay (AgentEventAguiReplayer) feeds every stored AgentEvent through the full converter registry on a fresh AguiStreamContext. Stored RequireUserConfirmEvent / suspended tool results are re-converted into new interrupts, and AgentEndEvent re-emits RUN_FINISHED with a RunFinishedInterruptOutcome — so reconnecting replays already-resolved clarifications as live frontend interrupt UI (stuck "Running" state, form re-appearing unsubmitted). Impact: CopilotKit/AG-UI history replay re-activates resolved HITL dialogs; the UI state diverges from the persisted transcript. Severity: high

Suggested direction: during replay, resolve/short-circuit interrupt events against the stored post-confirmation state (emit the resolved tool result instead of a new interrupt), instead of re-running the live interrupt path.


Automated evaluation by github-manager-bot

oss-maintainer avatar Sep 14 '26 15:09 oss-maintainer