Skip to content

fix(agui): preserve error tool result content - #3932

Merged
jujn merged 1 commit into
agentscope-ai:mainfrom
iluv7:fix/agui-error-content
Nov 3, 2026
Merged

jujn merged 1 commit into
agentscope-ai:mainfrom
iluv7:fix/agui-error-content

Conversation

@iluv7

@iluv7 iluv7 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.1.0-SNAPSHOT

Description

Closes #3925.

ERROR tool results currently move their output text into error and leave content empty. CopilotKit 1.69.3 renders tool results from content, so the default tool card shows Done with an empty Result instead of the error text.

Keep the output in content for both single and multiple tool results, while retaining error. When converting back, include identical content and error text only once; distinct error and output text are still preserved.

Regression coverage includes serialized content, mixed success/error results, and repeated JSON round trips without duplicated text or loss of error state.

Validation:

  • Confirmed four regression failures on the original code; all 67 converter tests pass with the fix.
  • All 554 AG-UI tests and Spotless checks pass.
  • mvn -B -T1 clean verify passes across all 99 modules. Tests requiring unavailable external services are skipped by their existing conditions.

Checklist

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.) — no documentation changes.
  • Code is ready for review

@jujn
jujn merged commit 3ed55c5 into agentscope-ai:main Nov 3, 2026
5 checks passed
chickenlj pushed a commit that referenced this pull request Nov 13, 2026
Backport the verified fix to the 2.0.x implementation and retain its existing public contracts where the upstream kernel differs.

(cherry picked from commit 3ed55c5)
Backport-review-patch: 13d90f3ec1409a15a37b78594b7389787052e223
Constraint: No AgentScope Service or SDK migration
Confidence: high
Not-tested: Whole-repository verification pending after lane integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: AguiMessageConverter 转换 ToolResultBlock 状态为ToolResultState.ERROR 数据缺失 content

2 participants