fix(agent): keep nested tool basic/advanced modes attached to their tools - #7804
Merged
Merged
Conversation
…ools Tool canonical-mode overrides are keyed by array position, so a reorder or removal must move them with the tools. - Workflow edit engine (v2 operations API, Chat) reindexes modes when a batch rewrites a block's tool list, matching tools by content, then by type - Editor persists the tool list and reindexed modes in one realtime operation instead of two independent writes that could partially persist
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Collaborator
Author
Collaborator
Author
Collaborator
Author
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
canonicalModes, so a reorder or removal has to move them with the toolsPOST /api/v2/workflows/{id}/operationsswapped each tool's mode. It now reindexes after every batch that rewrites a tool list, matching tools by content (ignoringisExpanded), then by type so in-place param edits keep their modes. Removed tools' modes are dropped. Covers everytool-inputfield, not justtoolsreplace-canonical-modes+subblock-update), so one could persist without the other and leave modes on the wrong tools. It is now onesubblock-update-with-canonical-modesop, written in one transactionreplace-canonical-modesis no longer sent but still accepted and applied, so tabs loaded before this deploy keep working. A new client talking to a realtime server that hasn't rolled out yet gets a validation error (offline banner, no corruption) until the deploy completesType of Change
Testing
applyOperationsToWorkflowState(confirmed they fail without the fix)type-check(sim, realtime, realtime-protocol),lint,check:audits, block registry and docs manifest checks passChecklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01WbCdLsJxoQ9gb41Pzfxo68