Skip to content

Workflow output delegation drops message content and combined approval events #7949

Description

@1828703450qqcom-ux

Description

After a parent calls ctx.run_node(child, use_as_output=True), an event such as Event(output=result, content=...) loses its entire message: NodeRunner drops the event instead of only removing the repeated output. This also drops a combined function-call/long-running-tool event, leaving a workflow waiting for an approval the caller cannot see and that was never persisted.

The same suppression drops Event(output=result, error_code="UPSTREAM_ERROR"), Event(output=result, error_message="The upstream operation failed."), or an event containing both error fields. These errors are absent from the streamed events and stored session, even when the message-content portion of the fix is present.

Reproduction

In a BaseNode with rerun_on_resume=True, run a child with use_as_output=True, then yield:

yield Event(
    output=result,
    content=types.Content(parts=[types.Part(function_call=types.FunctionCall(
        name="approve", id="approval", args={}
    ))]),
    long_running_tool_ids={"approval"},
)

Run that node through Runner in a Workflow. The child's output is present, but no event with long_running_tool_ids={"approval"} reaches the caller or session. Without output delegation, the message survives. Plain text and inline-image content exhibit the same loss.

Expected behavior

Suppress the duplicate output while retaining the event's message, including its function call and interrupt marker. The approval response should then resume the workflow normally.

Retain nonempty error_code and error_message fields in the forwarded and persisted event as well. Error-only payloads should be visible while their repeated output remains suppressed.

Environment and scope

Reproduced against main 73ae69e on Python 3.13 using real Runner, Workflow, Context, and InMemorySessionService, without a model or network API. This is the message-content counterpart of the route preservation landed in #7931; it is reproducible after that fix is on main. Searches for delegated content, use_as_output interruption, and output suppression did not find an existing fix.

AI assistance was used to investigate and prepare regression tests.

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. added theissue type on Nov 3, 2026
  3. added
    core[Component] This issue is related to the core interface and implementation
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions