Skip to content

Python: Autonomous handoff re-invokes downstream orchestrations (Magentic/Concurrent) and can fail with already completed runtime error #6240

@BharathRajR

Description

@BharathRajR

When using HandoffBuilder in autonomous mode as a non-terminal orchestration and chaining it to another orchestration, I see repeated downstream invocations.

Observed behavior

  • In handoff + magentic, downstream gets invoked multiple times.
  • In handoff + concurrent, I see multiple agent_started events, suggesting repeated invocations.
  • This appears to happen because autonomous handoff emits multiple outputs, and downstream gets triggered for each output.

Exact error seen (handoff + magentic)

  • Workflow execution failed: RuntimeError: This Magentic workflow has already been completed. No further messages can be processed. Use the builder to create a new workflow instance to handle additional tasks.

Expected behaviour or clarification needed

  • Please confirm whether this is expected by design for autonomous handoff when chained to downstream orchestrations.
  • If expected, please share the recommended composition pattern so downstream executes once per logical handoff completion.
  • If not expected, please confirm if this should be treated as a bug.
  • Clarification on whether the turn limit should be 50 for it to work in autonomous mode, if not how to set a valid turn limit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions