You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Separate worker context activation from resumable node lifetime #272
Container nodes can start on one worker and resume on another. Layer hooks currently cover the logical node lifetime only: on_node_run_start runs before the initial segment and on_node_run_end runs after the final segment. A tracing layer that attaches a context on start and detaches on end therefore uses a context token on a different worker. Child execution also lacks the owning container execution identity at the activation boundary, so child spans can become siblings of the container span.
Expected behavior
Provide a framework-neutral layer context manager around each worker execution segment, including resume. Enter and exit it in the same worker context, including suspension and failures. Expose the direct owning container execution ID for child segments, consistently for Workflow Tool, Loop, and Iteration containers. Keep logical start/end hooks unchanged and leave span creation and tracing-provider integration to consumers.
Related work
This supports langgenius/dify#40277. Earlier workflow-as-tool identity work is tracked in #104; this issue concerns the subsequent cooperative worker lifecycle.
Activity