You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user denies a tool call in permission-mode HITL, the resumed run emits no ToolResultStartEvent / ToolResultEndEvent for it. A client driving the AG-UI protocol therefore
never learns the outcome of that tool call and has to synthesise the state from its own local record
of the decision.
Rule-based denial behaves the opposite way and does emit the events, so the two denial paths are
inconsistent.
Where
ReActAgent.PermissionFlow#applyConfirmResults — for a denied ConfirmResult it only appends a ToolResultBlock.text("Permission denied by user").withState(DENIED) to the message context.
No publishEvent(...).
ReActAgent#runToolBatch — rule-denied calls do publish ToolResultStartEvent with "Permission denied by rules" and a matching end event.
Why it matters
The AG-UI mapping is event-driven. Without an event, AguiStreamContext produces no TOOL_CALL_RESULT, so a conforming client cannot distinguish "denied" from "result never arrived"
without keeping its own side-channel state. It also means the denial is invisible to anything else
that observes the agent event stream (tracing, audit, replay).
Suggested fix
Publish the same ToolResultStartEvent → delta → ToolResultEndEvent(state = DENIED) sequence from
the user-denial path that runToolBatch already publishes for rule-denied calls.
agentscope-core/.../ReActAgent.java:1981-2015 (PermissionFlow.applyConfirmResults) only appends ToolResultBlock.text("Permission denied by user").withState(DENIED) to the context — no publishEvent(...) call.
agentscope-core/.../ReActAgent.java:2956-2999 (runToolBatch) does emit ToolResultStartEvent → ToolResultTextDeltaEvent("Permission denied by rules") → ToolResultEndEvent(state=DENIED) for rule denials.
Impact: event-driven consumers (AG-UI TOOL_CALL_RESULT, tracing, audit, replay) cannot distinguish "denied" from "result never arrived". Severity: medium.
Suggested fix: in applyConfirmResults, for each denied ConfirmResult publish the same start → delta("Permission denied by user") → end(state=DENIED) sequence that runToolBatch already produces, so both denial paths converge on one event contract.
An automated fix proposal will be generated. Reply /approve to proceed with PR generation.
There are currently two PRs addressing this issue: #3099 and #3104. For maintainers' convenience, #3104 includes an end-to-end regression covering event ordering, reply/tool-call correlation, and DENIED state; its License, Module Sync, Ubuntu, Windows, CLA, and Codecov checks are currently green. #3099 is presently conflicting and its Ubuntu build is failing. I'm happy for the project to consolidate or choose whichever implementation best fits the existing event contract; I will not maintain a competing duplicate if one PR is selected.
Per our workflow we skip PR generation whenever an open PR already targets the same root cause, to avoid duplicate competing fixes. Note #3099 is currently CONFLICTING with main; #3104 is mergeable. Reviewers can pick between them without any additional action from us.
Activity
oss-maintainer commentedon Sep 11, 2026
Issue Evaluation
Category:
bug| Status: ConfirmedVerified against
main@c5db8f7.Root cause: the two denial paths are asymmetric.
agentscope-core/.../ReActAgent.java:1981-2015(PermissionFlow.applyConfirmResults) only appendsToolResultBlock.text("Permission denied by user").withState(DENIED)to the context — nopublishEvent(...)call.agentscope-core/.../ReActAgent.java:2956-2999(runToolBatch) does emitToolResultStartEvent→ToolResultTextDeltaEvent("Permission denied by rules")→ToolResultEndEvent(state=DENIED)for rule denials.Impact: event-driven consumers (AG-UI
TOOL_CALL_RESULT, tracing, audit, replay) cannot distinguish "denied" from "result never arrived". Severity: medium.Suggested fix: in
applyConfirmResults, for each deniedConfirmResultpublish the same start → delta("Permission denied by user") → end(state=DENIED) sequence thatrunToolBatchalready produces, so both denial paths converge on one event contract.An automated fix proposal will be generated. Reply
/approveto proceed with PR generation.Automated evaluation by github-manager-bot
CryoThrust commentedon Sep 11, 2026
There are currently two PRs addressing this issue: #3099 and #3104. For maintainers' convenience, #3104 includes an end-to-end regression covering event ordering, reply/tool-call correlation, and
DENIEDstate; its License, Module Sync, Ubuntu, Windows, CLA, and Codecov checks are currently green. #3099 is presently conflicting and its Ubuntu build is failing. I'm happy for the project to consolidate or choose whichever implementation best fits the existing event contract; I will not maintain a competing duplicate if one PR is selected.oss-maintainer commentedon Sep 11, 2026
Status: no automated PR will be generated — already covered by open community PRs
Thanks for flagging this in the proposal window. Cross-checked the open PR queue against this issue:
fix: emit permission-denied tool result eventsfix(core): emit tool result events for user-denied HITL calls, includes the end-to-end regression for event ordering / reply+tool-call correlation / denial pathPer our workflow we skip PR generation whenever an open PR already targets the same root cause, to avoid duplicate competing fixes. Note #3099 is currently
CONFLICTINGwithmain; #3104 is mergeable. Reviewers can pick between them without any additional action from us.Automated by github-manager-bot