Skip to content

feat: confirmToolCall support — startToolCall with requireConfirmation + ToolRunnableCallable [JAR-9208]#703

Open
JoshParkSJ wants to merge 2 commits intomainfrom
josh/cas-tc-fix
Open

feat: confirmToolCall support — startToolCall with requireConfirmation + ToolRunnableCallable [JAR-9208]#703
JoshParkSJ wants to merge 2 commits intomainfrom
josh/cas-tc-fix

Conversation

@JoshParkSJ
Copy link
Copy Markdown
Contributor

@JoshParkSJ JoshParkSJ commented Mar 17, 2026

Changes

  • Moves tool confirmation from the old interrupt-based flow to confirmToolCall on startToolCall:
  1. Graph build — LangGraph's wrapping discards the original BaseTool reference; the typed subclass preserves .tool so the runtime can inspect it at init time (so we know which tools need confirmation before hitting the tool node and can pass require confirmation on startToolCall)
  2. Runtime init_get_tool_confirmation_info walks the compiled graph once, finds ConversationalToolRunnableCallable nodes, and builds a {tool_name: input_schema} lookup. This is needed because coded agents (create_agent) export a compiled graph as the only artifact — there's no side channel to pass confirmation metadata from the build step to the runtime.
  3. Streaming — mapper checks the lookup on every AIMessage tool call, emits startToolCall with requireConfirmation: true and inputSchema.
  • fixes AIMessageChunk self-accumulation bug that doubled tool names on the first streamed chunk (only triggered with OpenAI, not Claude); startToolCall now always emitted for confirmation tools
  • rip-and-replace as we see zero production usage confirmed via App Insights telemetry (90 days)

Companion PRs

https://uipath.atlassian.net/browse/JAR-9208

@JoshParkSJ JoshParkSJ force-pushed the josh/cas-tc-fix branch 2 times, most recently from f129206 to 5700f6b Compare April 12, 2026 15:02
@JoshParkSJ JoshParkSJ force-pushed the josh/cas-tc-fix branch 6 times, most recently from 1eed1e2 to f655a29 Compare April 14, 2026 13:34
@JoshParkSJ JoshParkSJ changed the title fix: revert deferred tool call [JAR-9208] feat: confirmToolCall support — startToolCall with requireConfirmation + ToolRunnableCallable [JAR-9208] Apr 14, 2026
@JoshParkSJ JoshParkSJ force-pushed the josh/cas-tc-fix branch 9 times, most recently from 413c601 to 4d8b645 Compare April 15, 2026 02:01
Walks compiled graph nodes once at runtime init. This is needed because coded agents
(create_agent) export a compiled graph as the only artifact — there's no side channel
to pass confirmation metadata from the build step to the runtime.
"""
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a problem for low code agents, but might as well unify how we get tools requiring confirmation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants