Skip to content

[Bug]:权限系统,触发ASK , 用户拒绝后,tool_result能否支持携带用户拒绝原因 ,并且拒绝后没有对应的tool_result事件产生 #2492

Closed

Description

@qu-yquan

1.当前拒绝后,工具会返回固定的消息:Permission denied by user ,不够灵活,能否在 io.agentscope.core.event.ConfirmResult 加一个字段用于自定义这个内容,或者复用Msg的textContent

Image
  1. ASK权限手动触发拒绝后,没有发送对应的ToolResultStartEvent、ToolResultTextDeltaEvent、ToolResultEndEvent 事件(框架自动拒绝的情况有发送)。

Activity

  1. added
    bug
    on Jul 30, 2026
  2. liulangjietou commented on Aug 4, 2026

    @liulangjietou
    Contributor

    I'd like to work on this. Both points verified in code:

    1. The denial text is hardcoded at the manual-deny path in ReActAgent.applyConfirmResults (ToolResultBlock.text("Permission denied by user")). Plan: add an optional reason field to ConfirmResult (backward compatible — existing constructors keep working), and use it as the tool result text when present.

    2. Confirmed asymmetry: the rule-based auto-deny path emits ToolResultStartEvent → ToolResultTextDeltaEvent → ToolResultEndEvent, while the manual-deny path only writes the DENIED ToolResultBlock into context without emitting any events. Plan: emit the same event triple for manually denied tool calls on resume, carrying the denial reason as the delta text.

    Will keep the change focused on these two points with regression tests for both.

  3. added 2 commits that reference this issue on Aug 4, 2026
    3b3020b
    b2cb1c9
  4. added
    area/core/agent
    on Aug 11, 2026
  5. tcsp commented on Sep 21, 2026

    @tcsp
    Contributor

    我也有自定义reason的诉求,这个还没有合并到主干吗?

  6. moved this from In progress to Done in AgentScope Javaon Sep 21, 2026
  7. added a commit that references this issue on Sep 21, 2026
    c0d03cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/core/agentbug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions