Skip to content

fix(adka2a): exclude artifacts from input-required A2A responses#972

Open
anishesg wants to merge 1 commit into
google:mainfrom
proudhare:fix/ph-issue-913
Open

fix(adka2a): exclude artifacts from input-required A2A responses#972
anishesg wants to merge 1 commit into
google:mainfrom
proudhare:fix/ph-issue-913

Conversation

@anishesg
Copy link
Copy Markdown
Contributor

@anishesg anishesg commented Jun 6, 2026

Link to Issue

Fixes #913

Problem

When adk-go sends A2A responses for input-required tasks, it includes artifacts containing messages alongside the status update. This format diverges from adk-python's implementation, which sends only a rich history structure without artifacts. The artifacts section triggers incorrect behavior in adk-python clients connecting via RemoteA2aAgent, causing them to generate a spurious mock_function_call_for_required_user_input.

Solution

Modified the A2A response serialization in server/adka2a/v2/input_required.go and server/adka2a/v2/executor.go to ensure that for input-required tasks, all content (function calls, responses, and text messages) is included in the status message instead of being sent as separate artifacts. This aligns adk-go's response format with adk-python's expectations.

The fix includes two key changes:

  • In input_required.go, the inputRequiredProcessor now accumulates all parts from events after detecting a long-running function call, placing them in the status message rather than leaving them to be sent as artifacts.
  • In executor.go, the writeFinalTaskStatus method now skips sending the partial artifact reset when the final state is TaskStateInputRequired.

Testing Plan

Unit Tests

  • Updated and ran unit tests in server/adka2a/v2/processor_test.go
  • All existing tests pass with the updated behavior
  • Test case "long running tool call before receiving all parts" now correctly expects text messages in the status message instead of artifacts
=== RUN   TestEventProcessor_Process
--- PASS: TestEventProcessor_Process (0.01s)
    --- PASS: TestEventProcessor_Process/long_running_tool_call_before_receiving_all_parts (0.00s)
PASS
ok  	google.golang.org/adk/server/adka2a/v2	0.031s

## Link to Issue

Signed-off-by: anish <anishesg@users.noreply.github.com>
@anishesg
Copy link
Copy Markdown
Contributor Author

anishesg commented Jun 7, 2026

checked the CI failure - all tests actually pass, including the modified test case. the bare "FAIL" at the end without a package name or error message looks like a CI infrastructure glitch. local runs with the same flags pass cleanly. can we re-run the workflow?

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.

input-required A2A response format incompatible with adk-python / adk web

1 participant