Skip to content

feat: add confirmToolCall support to CAS chat bridge [JAR-8666]#1558

Draft
JoshParkSJ wants to merge 1 commit intomainfrom
josh/cas-confirm-tool-call
Draft

feat: add confirmToolCall support to CAS chat bridge [JAR-8666]#1558
JoshParkSJ wants to merge 1 commit intomainfrom
josh/cas-confirm-tool-call

Conversation

@JoshParkSJ
Copy link
Copy Markdown
Contributor

@JoshParkSJ JoshParkSJ commented Apr 11, 2026

What changed?

Support the new confirmToolCall flow in the CAS WebSocket bridge, replacing the legacy interrupt-based tool confirmation entirely.

Changes

uipath-core (data models):

  • UiPathConversationToolCallConfirmationEvent — new model for confirmToolCall events (approved: bool, input: Any | None)
  • UiPathConversationToolCallStartEvent — added require_confirmation and input_schema fields
  • UiPathConversationToolCallEvent — added confirm field (alias: confirmToolCall)
  • interrupt.py — removed all tool-call-confirmation-specific models (InterruptTypeEnum, ToolCallConfirmationValue, ToolCallConfirmationEndValue, and their interrupt wrappers). Generic interrupt models are retained for deserialization of existing conversation history.

uipath (bridge):

  • _bridge.py_handle_conversation_event now detects incoming confirmToolCall events and sets the resume event. The old endInterrupt handler and emit_interrupt_event() method are removed entirely.
  • wait_for_resume() returns the new {approved, input} payload directly.

Why rip-and-replace instead of backward compatibility?

We evaluated maintaining backward compat with the old startInterrupt/endInterrupt flow and decided against it:

  1. Both sides break the old flow — backward compat is impossible at the system level. PR AgentInterfaces#899 removes the onInterruptStart handler from ConversationProvider.tsx, so even if old Python agents emit startInterrupt, new CAS won't render the confirmation widget. Conversely, old CAS sends endInterrupt which new Python won't handle. Neither transition state works — there is no graceful degradation in either direction.

  2. Zero production usage. We verified via App Insights telemetry across both jarvis-prd-eus-ais (CAS) and agents-prd-appins-ne-appins (Python) over 90 days:

    • Agent.ToolCallStart count == Agent.ToolCallEnd count (332 each) — no orphaned endToolCall events, meaning no confirmation tools were ever invoked (the old mapper skipped startToolCall for confirmation tools, so asymmetry would indicate usage)
    • Zero InterruptStartEvent received from agent traces in CAS controller logs — the log line at conversation-agent-event.controller.ts:466 that fires on every agent interrupt was never hit
    • The @requires_approval decorator ships in the package but no deployed agent exercises it
  3. Deployment is coordinated. CAS deploys first (it doesn't depend on the Python changes), then Python. The tool confirmation feature is staging-only; the brief deployment window has no user impact.

  4. Dead code elimination. The backward compat code in hitl.py (dual payload parsing for legacy {type, value} shape) was unreachable anyway — the bridge is the only thing delivering resume payloads for conversational agents, and it now only produces the new {approved, input} shape.

This is the Python-side counterpart to AgentInterfaces#899 and uipath-langchain-python#703.

How has this been tested?

  • Manual end-to-end test with tc-1 agent: Accept, Cancel, Modify+Accept, and empty required field validation all verified working.

Are there any breaking changes?

  • None
  • Under Feature Flag
  • UiPath CLI Runtime changes

@JoshParkSJ JoshParkSJ force-pushed the josh/cas-confirm-tool-call branch from 6df4f17 to cc0be81 Compare April 14, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant