Open
Conversation
maxduu
approved these changes
Mar 18, 2026
50d6207 to
d67cb25
Compare
f129206 to
5700f6b
Compare
3 tasks
3f4919c to
ce08e95
Compare
ce08e95 to
da450a3
Compare
Three fixes for coded agent tool confirmation: 1. hitl.py: @requires_approval now stamps REQUIRE_CONVERSATIONAL_CONFIRMATION metadata so the runtime can discover confirmation tools. 2. runtime.py: _get_tool_confirmation_info handles both graph shapes — UiPathToolNode (low-code, bound.tool) and LangGraph ToolNode (create_agent, bound.tools_by_name). 3. messages.py: seed chunk accumulator with an empty AIMessageChunk instead of the incoming message. Prevents self-merge on the first streaming chunk which doubled tool names (e.g. search_websearch_web) and broke the confirmation set lookup.
a1f31dd to
10e34fd
Compare
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.
What changed?
Moves tool confirmation from the old interrupt-based flow to the new
confirmToolCallevent onstartToolCall, with a clean rip-and-replace of all legacy code.https://uipath.atlassian.net/browse/JAR-9208
Changes
hitl.py(HITL approval flow):UiPathConversationToolCallConfirmationValue— the@durable_interruptinask_confirmation()now emits a plain dict instead of the old interrupt model{"type": ..., "value": {...}}shape fromendInterrupt). Resume payloads are now always theconfirmToolCallshape:{"approved": bool, "input": ...}ARGS_MODIFIED_MESSAGEconstant, replacing theargs_modified_by_user: Trueboolean with a human-readablemessagefield in tool result metadatamessages.py(event mapper):startToolCallis now always emitted for confirmation tools (previously skipped). CAS readsrequireConfirmationandinputSchemafrom this event to render the confirmation UI.map_tool_call_to_tool_call_start_event()acceptsrequire_confirmationandinput_schemakwargsruntime.py:_get_tool_confirmation_schemas()to extract JSON schemas from tools marked withrequire_conversational_confirmation, passed to the mapper astool_confirmation_schemasWhy rip-and-replace instead of backward compatibility?
We evaluated maintaining backward compat with the old
startInterrupt/endInterruptflow and decided against it:Both sides break the old flow — backward compat is impossible at the system level. AgentInterfaces#899 removes the
onInterruptStarthandler from the frontend, so old interrupt events won't render. uipath-python#1558 removesemit_interrupt_eventandendInterrupthandling from the bridge. Neither transition state (old Python + new CAS, or new Python + old CAS) produces a working confirmation flow — there is no graceful degradation in either direction.Zero production usage. App Insights telemetry over 90 days across both
jarvis-prd-eus-aisandagents-prd-appins-ne-appinsconfirmed:ToolCallStartcount equalsToolCallEndcount (332 each, no skipped starts indicating confirmation tools), zeroInterruptStartEventtraces in CAS. The@requires_approvaldecorator ships in the package but no deployed agent exercises it.The backward compat was already dead code. The dual payload parsing in
hitl.pyhandled the legacy{type, value}shape, but the bridge (the only thing delivering resume payloads for conversational agents) already only produces{approved, input}after uipath-python#1558. The legacy branch was unreachable.Deployment is coordinated. CAS deploys first, then Python. The feature is staging-only.
See also: AgentInterfaces#899, uipath-python#1558, uipath-runtime-python#99