[BUG] A delegated order reaches the event stream but not the next workflow step
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
🔴 Required Information
Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A
Describe the Bug:
A function node that calls await ctx.run_node(child, use_as_output=True) publishes the child's answer as delegated output, but does not expose that value as its own live output. A following workflow node receives None and produces a receipt without the order.
I was using a purchasing workflow with a dispatch step and a receipt step. Dispatch delegates order extraction to a buyer agent and uses use_as_output=True to make the buyer's result its output. For “Please pack 10 folders,” the real buyer produces 10 folders, but the receipt is Packed: MISSING_ORDER. Adding only return before the awaited child call produces Packed: 10 folders.
Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:
- Install the google-adk with version 2.14.0
- Config the llm model
- Run the python code which I provided in "Minimal Reproduction Code"
Expected Behavior:
With use_as_output=True, the completed child's order should become the calling dispatch node's output and reach its graph successor. The receipt should contain Packed: 10 folders, including when dispatch does not independently return or yield the child's value.
Observed Behavior:
The final real main prints Packed: MISSING_ORDER and fails its application assertion.
Environment Details:
- ADK Library Version (pip show google-adk):
- Desktop OS:** [e.g., macOS, Linux, Windows]
- Python Version (python -V):
Model Information:
- Are you using LiteLLM: No
- Which model is being used: deepseek-v4.1-flash
🟡 Optional Information
Providing this information greatly speeds up the resolution process.
Regression:
Did this work in a previous version of ADK? If so, which one? Not sure.
Logs:
Please attach relevant logs. Wrap them in code blocks (```) or attach a
text file.
Packed: MISSING_ORDER
Traceback (most recent call last):
File "/tmp/agent-framework-context-audit/adk-python/investigation/delegated-parent-output/main.py", line 36, in <module>
asyncio.run(main())
File "/tmp/agent-framework-context-audit/adk-python/conda-env/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/tmp/agent-framework-context-audit/adk-python/conda-env/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/agent-framework-context-audit/adk-python/conda-env/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/tmp/agent-framework-context-audit/adk-python/investigation/delegated-parent-output/main.py", line 34, in main
assert "10 folders" in str(answer), "The receipt stage lost the delegated order"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: The receipt stage lost the delegated order
Screenshots / Video:
If applicable, add screenshots or screen recordings to help explain
your problem.
Additional Context:
Add any other context about the problem here.
Minimal Reproduction Code:
Please provide a code snippet or a link to a Gist/repo that isolates the issue.
import asyncio
import os
from google.adk import Agent, Context, Runner, Workflow
from google.adk.models.lite_llm import LiteLlm
from google.adk.sessions import InMemorySessionService
from google.adk.workflow import node
from google.genai import types
model = LiteLlm(model="openai/deepseek-flash", api_base="https://api.deepseek.com/v1",
api_key=os.environ["DEEPSEEK_API_KEY"], temperature=0,
extra_body={"thinking": {"type": "disabled"}})
buyer = Agent(name="buyer", model=model,
instruction="Extract the order as a short line such as '10 folders'. Return only that line.")
@node(rerun_on_resume=True)
async def dispatch(ctx: Context, node_input: str):
await ctx.run_node(buyer, node_input, use_as_output=True)
def receipt(node_input: str | None = None) -> str:
return "Packed: " + (node_input or "MISSING_ORDER")
workflow = Workflow(name="purchasing", edges=[("START", dispatch, receipt)])
async def main():
sessions = InMemorySessionService()
session = await sessions.create_session(app_name="purchasing", user_id="buyer")
runner = Runner(node=workflow, app_name="purchasing", session_service=sessions)
answer = None
async for event in runner.run_async(user_id="buyer", session_id=session.id,
new_message=types.Content(role="user", parts=[types.Part(text="Please pack 10 folders.")])):
if event.output is not None:
answer = event.output
print(answer)
assert "10 folders" in str(answer), "The receipt stage lost the delegated order"
asyncio.run(main())
How often has this issue occurred?:
- Always (100%)
- Often (50%+)
- Intermittently (<50%)
- Once / Rare
- Ngôn ngữ chính
- Python
- Star
- 22.3k
- Fork
- 4.4k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/adk-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/adk-python#8360 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
google/adk-python#8359 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Can pin to litellm version be changed?Có thể đã có người làm @llalitkumarrr đã nhận 10 ngày trước. Đang mởmodels
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
google/adk-python#8129 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
OpenAPI tools ignore operation- and path-level server overridesCó thể đã có người làm @sanketpatil06 đã nhận 14 ngày trước. Đang mởtools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
google/adk-python#8064 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Two docstrings in openapi_tool document parameters the signatures do not acceptCó thể đã có người làm @surajksharma07 đã nhận 17 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
google/adk-python#8024 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của google/adk-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vllm-project/vllm#70030 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TigreGotico/tugaphone#408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
gke-labs/kube-agents#7308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
chore
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
lugassawan/swe-workbench#841 ·