Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: a2a-java client sends message with empty task ID and context ID

未关闭
#770 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
领域
api, backend

调研方向

查看 A2A Java client 的消息序列化代码,该代码可能位于负责构建 JSON-RPC 请求的类中。找到设置 taskId 和 contextId 字段的位置。确保省略可选的空字段。通过发送消息并验证 JSON payload 排除空字符串来进行测试。检查 .Net agent 对空 ID 的响应处理。

由索引模型根据 Issue 内容生成。

描述

What happened?

While investigating errors reported by https://darrelmiller.github.io/agentbin/index.html, I found out that messages sent by the A2A Java client contains empty taskId and contextId.
They look like (verbatim):

curl -sN -X POST https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec \
    -H "Content-Type: application/json" \
    -H "Accept: text/event-stream" \
    -d '{
  "jsonrpc": "2.0",
  "id": "839ffa13-d966-462c-88a2-136805189343",
  "method": "SendStreamingMessage",
  "params": {
    "tenant": "",
    "message": {
      "messageId": "'$(uuidgen | tr '[:upper:]' '[:lower:]')'",
      "taskId": "",
      "contextId": "",
      "role": "ROLE_USER",
      "parts": [
        {
          "text": "task-lifecycle process this",
          "metadata": {},
          "filename": "",
          "mediaType": ""
        }
      ],
      "metadata": {},
      "extensions": [],
      "referenceTaskIds": []
    },
    "configuration": {
      "acceptedOutputModes": [],
      "returnImmediately": false
    },
    "metadata": {}
  }
}'

I think the .Net remote agent should reject these messages (or ignore the empty taskId) but it replies with responses such as

data: {"jsonrpc":"2.0","id":"839ffa13-d966-462c-88a2-136805189343","result":{"task":{"id":"","contextId":"","status":{"state":"TASK_STATE_SUBMITTED","timestamp":"2026-03-26T12:06:00.4665426+00:00"}}}}

which are not deserialised by the a2a-java SDK due to the empty task.id.

The a2a-java client should omit optional fields that are not set when sending messages.
If I remove the taskId: "" field from the reproducer, the .Net agent replies with a generated taskId as expected.

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要语言
Java
星标
495
派生
174
平均合并
1 天 17 小时
30 天内合并 PR
48

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

a2aproject/a2a-java 的其他 Issue

查看 a2aproject/a2a-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。