Repository navigation
fix(agent): drop tool-row values left from a previous operation - #10080
Merged
Merged
Conversation
A tool row keeps stored values across operation switches but renders only the sub-blocks the new operation shows. A value written only by hidden sub-blocks stayed out of sight, was withheld from the model's schema as user-provided, and still reached the block mapper and the vendor. omitConditionHiddenParams drops a stored value only when every sub-block that writes it (canonical group included) is decidably hidden for the selected operation. Agent and Pi tool rows (transformBlockTool), Human-in-the-loop v2 notification tools, and the editor's operation switch all apply it.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were established. SummaryThe PR removes stored tool-row values when every matching field is clearly hidden by the selected operation.
No actionable issues were established. Tests were inspected but not run during this review. Intentional exclusion:
|
This was referenced Nov 16, 2026
This branch was previously deployed
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.
Summary
An Agent tool row keeps its stored values when the user switches the row's operation, but it renders only the sub-blocks the new operation's
conditionshows. A value written only by now-hidden sub-blocks stayed out of sight.createLLMToolSchemaalso withheld that param from the model, because the user had "provided" it. The value still reached the block mapper and the vendor at execution. Four cases with the real block configs:closed. Once mappers fall back to tool-call args, the list gets archived.Fix
omitConditionHiddenParams(subBlocks, params, operation)inlib/workflows/tool-input/hidden-params.tsdrops a stored value only when every sub-block that writes it is decidably hidden under{ ...params, operation }. The writers are sub-blocks matching the value's id or canonical id, widened to the whole basic/advanced group. Every unclear case keeps the value:operationis undecided.'true'/'5'is also tried as a boolean or number.model, which the model supplies at call time.reactiveConditionfields, and params no sub-block writes are always kept.Applied at:
transformBlockTool, before the schema,providerTool.paramsand the transform. This covers Agent and Pi tool rows, including rows saved before this change. The model now sees the param again when it isuser-or-llm. Pi's projected-provenance copy keeps the same keys, the way the agent handler's copy already did.prepareNotificationToolParams). v1 is unchanged on purpose.getParamsForToolOperationwhen the editor switches operations, so rows stop collecting stale values. It now takes the selected operation.Canvas execution is not affected. The serializer already drops sub-blocks whose condition is false (
shouldSerializeSubBlock).Review
An independent read-only reviewer ran the helper against the real tool-row renderer (
getSubBlocksForToolInput). It covered every block with tools, including github, slack, gmail, google_sheets, table, file, notion, hubspot, jira, trello, checkr, cbinsights, airtable, salesforce and microsoft_teams, across every operation. For each operation it tried each option value of each dropdown, switch and checkbox, with values typed and as strings, and stored under both the sub-block id and the canonical id. That came to about 117k combinations and about 1M rendered fields. No visible value was dropped.Tests
The new cases in
providers/utils.test.tsrun the real transform andprepareToolExecutionwith the real block configs:transformBlockToolguard is reverted.getParamsForToolOperationguard is reverted.bun run testpasses forproviders/utils.test.ts,tools/index.test.ts, the agent, HITL and Pi handler suites, and the custom-block and tool-input suites.🤖 Generated with Claude Code