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
fix(agent): show static args in conversation tool call events [UV-17565] - #1180
UV-17565: when a conversational agent's tool argument is bound with an argument expression, the tool runs with the bound value, but the chat and the Studio Web debug window show the value the model inferred.
Static args are applied to the tool calls after the model call (StaticArgsHandler.apply_to_response), but startToolCall / executingToolCall are built from the streamed chunks, which still carry the model's args.
Fix
StaticArgsHandler also keeps display values per tool, with sensitive values masked as <hidden>.
The LLM node passes them in the model run metadata. LangGraph forwards that metadata with each messages stream chunk.
The runtime passes the stream metadata to map_event, and the mapper applies the values to the tool call args when building the tool call events.
Testing
New mapper tests for the streamed and full-message paths.
A handler test for the display values and masking.
An end-to-end LLM node test that streams through a real LangGraph graph. It fails on main with LLM-GUESS-123.
Argument expressions (static args) are applied to the tool calls after the
model call, but startToolCall/executingToolCall are built from the streamed
chunks, so the chat and debug window showed the model-inferred args instead
of the ones the tool is called with.
The LLM node now passes the resolved display values (sensitive values masked)
in the model run metadata, and the message mapper applies them when building
the tool call events.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Confirmation approval can overwrite sensitive server-side tool arguments with the literal <hidden> placeholder, causing tools to receive masked values instead of their bound secrets.
This PR makes conversational tool-call events display resolved static arguments rather than model-inferred values, aligning chat and Studio Web debugging with tool execution.
Changes:
Pass static-argument display values through model-run metadata, masking sensitive values.
Apply those values when mapping streamed and full-message tool-call events.
Add regression coverage and bump the package version to 0.18.52.
The tool call events show sensitive static args masked, so the approval input
may carry the placeholder or drop the arg. Restore sensitive static args from
the server-side call args so the tool still gets the real value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore all static args from the server-side call args on approval, so an
edited arg (e.g. host) can't redirect a restored secret. Keep sensitive static
args masked in the approved args and cancel metadata sent back to the model
and client.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Edited confirmations can leak restored secrets into conversation output and subsequent model input, while empty wildcard arrays can leave bound tool inputs unrestored.
For a sensitive binding such as $['files'][*], approving {"files": []} leaves the list empty instead of restoring its bound value, so the tool executes without that input. apply_static_args() already handles this JSONPath limitation explicitly. Handle empty wildcard arrays in the restoration helper while preserving unrelated approved edits, and add a confirmation regression test.
Restore a [*] static path as the whole array, and remove a static path the
server-side call args don't have instead of keeping the client's value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The restore logic can revert approved dynamic-child edits and overwrite distinct nested arrays with the first match, causing data loss and incorrect argument-modification tracking.
…call
Restore static args on approval with the same dedup and apply_static_args
semantics used on the model's call, so objectBuilder markers don't revert
edits to dynamic children and nested [*] paths keep each array's length.
Co-Authored-By: Claude Opus 5.5 <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
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.
Problem
UV-17565: when a conversational agent's tool argument is bound with an argument expression, the tool runs with the bound value, but the chat and the Studio Web debug window show the value the model inferred.
Static args are applied to the tool calls after the model call (
StaticArgsHandler.apply_to_response), butstartToolCall/executingToolCallare built from the streamed chunks, which still carry the model's args.Fix
StaticArgsHandleralso keeps display values per tool, with sensitive values masked as<hidden>.messagesstream chunk.map_event, and the mapper applies the values to the tool call args when building the tool call events.Testing
mainwithLLM-GUESS-123.ruff,mypyand the full test suite pass locally.🤖 Generated with Claude Code