A2aAgentExecutor has no native way to emit TaskState.rejected on the server side
维护者通常 3 天内回复
@sanketpatil06 已经在做这个了。
开始于 2026年11月23日。
评估
调研方向
Start in google/adk/a2a/executor/a2a_agent_executor_impl.py around _handle_request and in google/adk/a2a/executor/task_result_aggregator.py where terminal states are tracked, then check google/adk/a2a/converters/to_adk_event.py to see how TS_REJECTED is already read on the client side. Settle on a server-side signal (exception type or event action flag) with the maintainers before coding. Done means a rejection maps to TS_REJECTED with priority above completed and distinct from failed, with tests covering both paths.
由索引模型根据 Issue 内容生成。
描述
Environment
google-adk==2.15.0a2a-sdk==0.3.26- Python
3.12
Problem
In the A2A specification, TaskState.rejected (TASK_STATE_REJECTED in v1.0) represents a policy/business refusal distinct from a technical execution failure (failed).
In google-adk==2.15.0:
- The client converter (
google/adk/a2a/converters/to_adk_event.py:70) recognizes_compat.TS_REJECTEDin_TASK_RESPONSE_BOUNDARY_STATES. - On the server side,
A2aAgentExecutor(google/adk/a2a/executor/a2a_agent_executor_impl.py:266-297) andTaskResultAggregator(google/adk/a2a/executor/task_result_aggregator.py:55-60) only trackcanceled,failed,auth_required,input_required,working, andcompleted. There is no ADK primitive (tool return contract,EventActionsfield, or mapped exception) for an agent or tool exposed viato_a2a()to emitTaskState.rejected.
Without a workaround, policy refusals end up either as completed (if the tool returns a refusal dict and the LLM explains it in text) or as failed (if an uncaught exception is raised, which clients interpret as a transient error rather than a semantic rejection).
Workaround
- Record a rejection reason from the remote tool / callback (e.g. in session-scoped store or state).
- In an
ExecuteInterceptor.after_agentpassed toA2aAgentExecutorConfig, replace the terminalTS_COMPLETEDTaskStatusUpdateEventwith a newTaskStatusUpdateEventcarrying_compat.TS_REJECTED(final=True) and the refusal message.
Suggested Fix in ADK
Provide a native server-side signal in ADK mapped by TaskResultAggregator / A2aAgentExecutor to _compat.TS_REJECTED — for example:
- a dedicated exception type (e.g.
A2aTaskRejectedErroror policy rejection error) or anEventActions/ToolContextaction flag honored byTaskResultAggregatorandA2aAgentExecutor._handle_request(with priority abovecompletedand distinct fromfailed).
- 主要语言
- Python
- 星标
- 22.3k
- 派生
- 4.4k
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/adk-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
google/adk-python#8360 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
google/adk-python#8359 ·
维护者通常 3 天内回复
-
Can pin to litellm version be changed?可能已有人在做 @llalitkumarrr 于 10 天前认领。 未关闭models
难度 1/5 1 小时以内 新手友好度 65/100
google/adk-python#8129 · 2 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
OpenAPI tools ignore operation- and path-level server overrides可能已有人在做 @sanketpatil06 于 14 天前认领。 未关闭tools
难度 2/5 1-3 小时 新手友好度 75/100
google/adk-python#8064 · 4 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
Two docstrings in openapi_tool document parameters the signatures do not accept可能已有人在做 @surajksharma07 于 17 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
google/adk-python#8024 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
查看 google/adk-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
vllm-project/vllm#70030 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
TigreGotico/tugaphone#408 ·
维护者通常 1 天内回复
-
t: bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 3 天内回复
-
needs-triage
难度 1/5 1 小时以内 新手友好度 85/100
Azure/azure-sdk-for-python#50155 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复