Skip to content

fix: interaction between static args and HITL argument rewrite#722

Merged
andreiancuta-uipath merged 5 commits intomainfrom
fix/early-static-args
Mar 26, 2026
Merged

fix: interaction between static args and HITL argument rewrite#722
andreiancuta-uipath merged 5 commits intomainfrom
fix/early-static-args

Conversation

@andreiancuta-uipath
Copy link
Copy Markdown
Contributor

@andreiancuta-uipath andreiancuta-uipath commented Mar 24, 2026

HITL guardrails can rewrite a tool call's arguments.
Previously, static args would be applied after HITL, which would overwrite the argument values back to the ones in the agent definition. In addition, the human would not see the static args in the HITL app interface.
This PR:

  • Applies static args to the LLM tool calls, as early as possible. HITL sees the arguments after they have been processed by the static args layer, and the human's decision is final.
    • StaticArgsHandler is lazy; compared to the previous code, it computes tool schemas and static values only once, and caches the results.
    • This also simplifies the tool nodes and their wrappers.
  • Fixes an edge case involving schema editing and $refs.
  • Strips enum fields from IS tool schemas. This is to prevent validation errors when HITL alters a static argument, because the user-rewritten argument would not match the schema enum.

@andreiancuta-uipath andreiancuta-uipath merged commit 9f99874 into main Mar 26, 2026
42 checks passed
@andreiancuta-uipath andreiancuta-uipath deleted the fix/early-static-args branch March 26, 2026 12:15
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