Skip to content

[Bug]: User messages sent together with a permission-HITL resume are silently dropped #3294

Description

@xuchaoguo1983

AgentScope-Java Version

2.0.3

Description

When a run is paused on permission HITL (a tool call in ASKING state), an AG-UI request that carries both a resume[] entry answering the interrupt and a new user message in messages succeeds. However, the new user message is silently dropped: it never enters the agent context, in this turn or in any later turn, and no error is raised.

Why (2.0.3)

  • AguiMessageConverter.toMsgList(RunAgentInput, …) returns the new user messages followed by the confirm-result message.
  • In ReActAgent, when askingToolCalls() is non-empty, the call goes to validateAndAcceptConfirmResults(msgs, asking) and then to resumeAgent(). That branch only extracts ConfirmResults from msgs. The remaining messages are never passed to addToContext.

Reproduction (verified on 2.0.3, AG-UI server + Redis state store)

  1. Send a user message. The model calls a tool that requires confirmation, and the run finishes with an interrupt.
  2. Send one request with messages = [...history, {role: user, content: "second message"}] and resume = [{interruptId, status: resolved, payload: {approved: false}}].
    • Actual: the tool is denied, and the model replies only to the denial. "second message" is absent from the model request, and it is also absent in the next turn.
    • For comparison: sending only the new message (no resume) is rejected with Thread has unresolved interrupts; RunAgentInput.resume must address all of them.

Expected

Either option would avoid silent loss of user input:

  • append the new user messages after the tool results, and let the model answer them in the same turn (a common UX: typing a new message cancels the pending approval); or
  • reject the request with a clear error, like the no-resume case.

Related: #3135 (orphaned ASKING state has no graceful path).

Activity

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/agentAgent runtime, pipeline, hooks, planbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions