Skip to content

fix: use child task IDs in a2a_mcp workflows - #693

Open
anxkhn wants to merge 2 commits into
a2aproject:mainfrom
anxkhn:fix/a2a-mcp-child-task-id
Open

fix: use child task IDs in a2a_mcp workflows#693
anxkhn wants to merge 2 commits into
a2aproject:mainfrom
anxkhn:fix/a2a-mcp-child-task-id

Conversation

@anxkhn

@anxkhn anxkhn commented Aug 20, 2026

Copy link
Copy Markdown

Summary

WorkflowNode.run_node forwarded the orchestrator's task ID to child agents. A2A interprets that ID as an existing task on the receiving agent, so the first child request failed with TaskNotFoundError because the child did not own that task.

This change stops OrchestratorAgent from assigning its task ID to graph nodes. WorkflowNode.run_node now omits taskId on the first child request, records the child-local ID returned by the stream, and reuses that ID when resuming work with the same child. The payload and task-ID extraction logic live in a2a_mcp/common/child_message.py.

Regression tests cover initial requests, resumed requests, streamed child task IDs, and node attribute handling.

Testing

uv run --no-sync pytest samples/python/agents/a2a_mcp/tests/test_workflow_task_id.py --verbose

All five tests pass.

@anxkhn
anxkhn force-pushed the fix/a2a-mcp-child-task-id branch from 7890052 to d128909 Compare August 20, 2026 20:48
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
@anxkhn
anxkhn force-pushed the fix/a2a-mcp-child-task-id branch from d128909 to 079a801 Compare August 20, 2026 20:52
…s/go/agents/deepresearch

Required for Go 1.27, where x/net's classic http2 implementation is
gated behind the http2legacy build tag and grpc v1.81.0 fails to compile
with 'undefined: http2.TrailerPrefix'.
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.

1 participant