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
{{ message }}
Repository navigation
[Bug]: AG-UI tool message error is ignored; failed frontend tools reach the model as successful results #3307
The AG-UI spec defines an optional error field on tool messages to signal that a frontend tool failed: "a failure is still an answer, as a tool message with error set" (tool-calls spec; ToolMessage.error?: string in messages).
AguiMessage only binds id, role, content, toolCalls, toolCallId, so error is silently dropped. AguiMessageConverter#addTextBlock then always builds the ToolResultBlock with ToolResultState.SUCCESS. A failed frontend tool therefore reaches the model as a successful result, and when the client puts the reason only in error (as the spec suggests) the model sees an empty/irrelevant result and cannot tell the call failed.
Reproduction (verified on 2.0.3 with a scripted model)
The client declares a frontend tool choose_x in RunAgentInput.tools; the model calls it; the run finishes with the call pending.
The next request carries {"role":"tool","toolCallId":"<id>","content":"{\"status\":\"failed\"}","error":"device offline"}.
The model request contains a ToolResultBlock with state=SUCCESS and only the content text; error is gone.
Expected
error is read from AG-UI tool messages and mapped to an error tool result (e.g. ToolResultState.ERROR, with the error text included in the output), so the model can distinguish a failed frontend tool from a successful one.
Verified against main@857e3e6cf by static code analysis (no runtime reproduction: this check host has no JDK/Maven toolchain).
Root cause — the inbound AG-UI tool message has no error binding at all:
agentscope-extensions-protocol/agentscope-extensions-agui/.../agui/model/AguiMessage.java:42-74 declares only id, role, content, toolCalls, toolCallId. There is no error property, no getter, and no @JsonProperty("error") anywhere in the module (repo-wide check).
agentscope-core/.../util/JacksonJsonCodec.java:71-75 disables FAIL_ON_UNKNOWN_PROPERTIES, so the client's error field is dropped silently rather than raising an error — which is why this fails invisibly instead of loudly.
AguiMessageConverter.java:292-302 (addTextBlock) then unconditionally constructs the ToolResultBlock with ToolResultState.SUCCESS, so the failure is indistinguishable from a success by the time the model request is built.
Impact — any AG-UI frontend tool that fails is reported to the ReActAgent as a successful result. When the client follows the spec and puts the reason only in error, the model receives an empty/irrelevant tool result and has no signal to retry, report the failure, or ask the user. Confined to agentscope-extensions-agui inbound conversion; the core tool path is unaffected.
Severity — high (spec-defined field ignored, silent wrong state reaching the model).
Proposed fix — small and self-contained, in the AG-UI model + converter:
Add an error field (with getter/setter/builder pass-through) to AguiMessage.
In AguiMessageConverter, when role == "tool" and error is non-blank, build the result through the existing ToolResultBlock.error(toolCallId, errorMessage) factory (agentscope-core/.../message/ToolResultBlock.java:242-249), which sets ToolResultState.ERROR and prefixes the text with [ERROR]. ReActAgent.determineToolResultState (agentscope-core/.../ReActAgent.java:3502-3519) already recognises both the state and the [ERROR] prefix, so no core change is needed.
Keep content when both content and error are present (the spec allows a payload alongside the error) rather than discarding it.
Out of scope / needs maintainer decision — whether the outbound toAguiMessage path should also propagate ToolResultState back to the client. Currently it only extracts text from the tool-result output; changing it alters the events a frontend sees, so it should be a separate decision.
Tests — AguiMessageConverterTest.java:201-238 covers the happy path for tool messages only. A fix should add: (1) error present without content → ERROR state with the error text; (2) error + content → ERROR state, both retained; (3) error blank/absent → unchanged SUCCESS behaviour (regression guard).
Reply /approve to generate a PR for this fix, /revise <notes> to adjust the proposal, or /reject to stop.
I'd like to take this one. I have a fix ready following the evaluation's proposal: bind error on AguiMessage (an additive @JsonCreator overload, the 5-argument constructor kept for source compatibility), build the result through ToolResultBlock.error(...) when the client reported an error, and keep any payload sent alongside it rather than discarding it. Four tests cover it, including a JSON round-trip through the framework's codec that proves the field is no longer dropped silently; reverting the converter change fails exactly the three error cases.
CI is green (ubuntu + windows), codecov/patch passes, and the automated review approved it with no open findings; it is waiting on a human review.
Scope in one line: the error field is bound and mapped to ToolResultState.ERROR inbound, the outbound direction mirrors an ERROR result back into error (gated to tool messages), and a result reported only as [ERROR] … text is recognised as well. The three wire-shape changes worth a release note are in the PR description.
Proposal window closed — no competing PR will be filed from this proposal window
The 72 h feedback window opened by the evaluation above (2026-09-26T12:14:25Z) reached its bound on 2026-09-29T12:14Z with no /approve, /revise or /reject directive from a harness owner.
The thread answered the question in another way: @kyy-logs wrote on 2026-09-27 that they were taking this issue with a fix following the evaluation's proposal (an additive error binding on AguiMessage, 5-arg constructor kept for source compatibility), and on 2026-09-29T03:46:04Z that the implementation is up as PR #3324. As of this read #3324 is OPEN, not a draft, review decision APPROVED, head 0a2a67c708, +832/-14 across 5 files, and it declares Fixes #3307.
So the implementation path for this request is already owned by a community PR awaiting maintainer merge. Filing a second PR against the same issue is exactly the collision this window policy exists to prevent, so this proposal is stood down and no automated PR will be generated from it.
Nothing here disputes the evaluation: a failed frontend tool reaching the model as a successful result is a real silent-failure path, and #3324 implements the recommended shape. Merge, close, or request changes on #3324 — that is the productive thread now. If #3324 is closed unmerged and this remains wanted, reply here and the question will be re-evaluated against whatever main looks like at that point.
Automated feedback-window maintenance by github-manager-bot
Activity
oss-maintainer commentedon Sep 26, 2026
Issue Evaluation
Category:
bug| Status: ConfirmedVerified against
main@857e3e6cfby static code analysis (no runtime reproduction: this check host has no JDK/Maven toolchain).Root cause — the inbound AG-UI tool message has no
errorbinding at all:agentscope-extensions-protocol/agentscope-extensions-agui/.../agui/model/AguiMessage.java:42-74declares onlyid,role,content,toolCalls,toolCallId. There is noerrorproperty, no getter, and no@JsonProperty("error")anywhere in the module (repo-wide check).agentscope-core/.../util/JacksonJsonCodec.java:71-75disablesFAIL_ON_UNKNOWN_PROPERTIES, so the client'serrorfield is dropped silently rather than raising an error — which is why this fails invisibly instead of loudly.AguiMessageConverter.java:292-302(addTextBlock) then unconditionally constructs theToolResultBlockwithToolResultState.SUCCESS, so the failure is indistinguishable from a success by the time the model request is built.Impact — any AG-UI frontend tool that fails is reported to the
ReActAgentas a successful result. When the client follows the spec and puts the reason only inerror, the model receives an empty/irrelevant tool result and has no signal to retry, report the failure, or ask the user. Confined toagentscope-extensions-aguiinbound conversion; the core tool path is unaffected.Severity — high (spec-defined field ignored, silent wrong state reaching the model).
Proposed fix — small and self-contained, in the AG-UI model + converter:
errorfield (with getter/setter/builder pass-through) toAguiMessage.AguiMessageConverter, whenrole == "tool"anderroris non-blank, build the result through the existingToolResultBlock.error(toolCallId, errorMessage)factory (agentscope-core/.../message/ToolResultBlock.java:242-249), which setsToolResultState.ERRORand prefixes the text with[ERROR].ReActAgent.determineToolResultState(agentscope-core/.../ReActAgent.java:3502-3519) already recognises both the state and the[ERROR]prefix, so no core change is needed.contentwhen bothcontentanderrorare present (the spec allows a payload alongside the error) rather than discarding it.Out of scope / needs maintainer decision — whether the outbound
toAguiMessagepath should also propagateToolResultStateback to the client. Currently it only extracts text from the tool-result output; changing it alters the events a frontend sees, so it should be a separate decision.Tests —
AguiMessageConverterTest.java:201-238covers the happy path for tool messages only. A fix should add: (1)errorpresent withoutcontent→ERRORstate with the error text; (2)error+content→ERRORstate, both retained; (3)errorblank/absent → unchangedSUCCESSbehaviour (regression guard).Reply
/approveto generate a PR for this fix,/revise <notes>to adjust the proposal, or/rejectto stop.Automated evaluation by github-manager-bot
kyy-logs commentedon Sep 27, 2026
I'd like to take this one. I have a fix ready following the evaluation's proposal: bind
erroronAguiMessage(an additive@JsonCreatoroverload, the 5-argument constructor kept for source compatibility), build the result throughToolResultBlock.error(...)when the client reported an error, and keep any payload sent alongside it rather than discarding it. Four tests cover it, including a JSON round-trip through the framework's codec that proves the field is no longer dropped silently; reverting the converter change fails exactly the three error cases.kyy-logs commentedon Sep 29, 2026
Status update: the fix is up as #3324.
CI is green (ubuntu + windows),
codecov/patchpasses, and the automated review approved it with no open findings; it is waiting on a human review.Scope in one line: the
errorfield is bound and mapped toToolResultState.ERRORinbound, the outbound direction mirrors anERRORresult back intoerror(gated to tool messages), and a result reported only as[ERROR] …text is recognised as well. The three wire-shape changes worth a release note are in the PR description.oss-maintainer commentedon Sep 29, 2026
Proposal window closed — no competing PR will be filed from this proposal window
The 72 h feedback window opened by the evaluation above (
2026-09-26T12:14:25Z) reached its bound on2026-09-29T12:14Zwith no/approve,/reviseor/rejectdirective from a harness owner.The thread answered the question in another way: @kyy-logs wrote on 2026-09-27 that they were taking this issue with a fix following the evaluation's proposal (an additive
errorbinding onAguiMessage, 5-arg constructor kept for source compatibility), and on 2026-09-29T03:46:04Z that the implementation is up as PR #3324. As of this read #3324 is OPEN, not a draft, review decision APPROVED, head0a2a67c708,+832/-14across 5 files, and it declaresFixes #3307.So the implementation path for this request is already owned by a community PR awaiting maintainer merge. Filing a second PR against the same issue is exactly the collision this window policy exists to prevent, so this proposal is stood down and no automated PR will be generated from it.
Nothing here disputes the evaluation: a failed frontend tool reaching the model as a successful result is a real silent-failure path, and #3324 implements the recommended shape. Merge, close, or request changes on #3324 — that is the productive thread now. If #3324 is closed unmerged and this remains wanted, reply here and the question will be re-evaluated against whatever
mainlooks like at that point.Automated feedback-window maintenance by github-manager-bot
fix(agui): report a frontend tool's error as an ERROR tool result (ag…