feat(escalation): two-phase escalation with inline task creation#528
Draft
dianagrecu-uipath wants to merge 5 commits intomainfrom
Draft
feat(escalation): two-phase escalation with inline task creation#528dianagrecu-uipath wants to merge 5 commits intomainfrom
dianagrecu-uipath wants to merge 5 commits intomainfrom
Conversation
Create task via client.tasks.create_async before calling interrupt(WaitEscalation), replacing the previous single-phase CreateEscalation approach. Also returns task_url in the escalation result. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ba6872f to
483b432
Compare
cristipufu
reviewed
Feb 6, 2026
| ) | ||
| async def escalate(): | ||
| client = UiPath() | ||
| task = await client.tasks.create_async( |
Member
There was a problem hiding this comment.
Langgraph re-executes the interrupted node on resumption (please make sure the task isn't created twice)
Contributor
There was a problem hiding this comment.
good point! I've added @task decorator to make sure task isn't created twice. Verified using logs in hacked-coded process in OR.
valentinabojan
approved these changes
Feb 6, 2026
Contributor
valentinabojan
left a comment
There was a problem hiding this comment.
We need to make sure the task is not created again when the node is re-executed after resume.
Prevents duplicate task creation on graph resume by caching the create_async result in the checkpointer via LangGraph's @task decorator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
***Accidentally Closed the PR opened by @saksharthakkar during a wrong rebase. Opened a new PR with the same changes ***
client.tasks.create_async, theninterrupt(WaitEscalation)(replaces single-phaseCreateEscalation)task_urlin escalation result alongside existingtask_idandassigned_toUiPathclient andtasks.create_asynccallTest plan
TestEscalationToolCreatesTaskBeforeInterrupttests verify two-phase flowScreen.Recording.2026-02-05.at.9.11.01.PM.mov