Skip to content

fix(blocks): keep agent-supplied tool args that block mappers remap from dedicated fields - #10006

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/agent-arg-fallbacks
Nov 13, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/agent-arg-fallbacks

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • On agent tool calls the model's args arrive under the tool's param names and merge with the stored tool params. The block's tools.config.params mapper then runs, and its output is spread over the result. A mapper that explicitly assigns a param from a differently named dedicated subBlock therefore overwrote the model's value with undefined/null, because that subBlock is never shown in agent tool-input.
  • Each affected mapper now takes (params, context) and falls back to the model's value. Where an advanced subBlock with the same id could hold a stale canvas value, the fallback is gated on context?.operation, which only agent calls pass (the same pattern as the Gauge block).
  • Canvas behavior is unchanged: canvas calls pass no context, and every new fallback is either context-gated or reads a field the canvas can't serialize for that operation.
  • Sites:
    • Azure DevOps: pipeline and comment continuation tokens, query top, update iterationPath, comment format.
    • Outlook: reply/forward cc and bcc, send/draft importance.
    • Gmail V2: thread id, thread format, label name, list query and label ids.
    • Google Calendar: list timeZone.
    • Google Drive: page size and page token for search, revisions, comments and permissions, plus the search query.
    • Google Groups: orderBy.
    • Google Vault: includeSharedDrives.
    • Microsoft AD: $filter/$search (these assignments weren't gated, so every agent call dropped the model's value) and membership transitive.

Type of Change

  • Bug fix

Testing

  • Agent-call and canvas cases in the touched block tests: azure_devops, gmail, google_calendar, google_drive, google_groups, google_vault, microsoft_ad, outlook.
  • All 27 agent cases fail against the pre-fix mappers, and the canvas cases pass on both versions. 79/79 pass with blocks/blocks.test.ts.
  • check:utils, check:test-patterns, check:comment-hygiene, check-block-registry origin/staging, check:tool-metadata and check:docs pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 13, 2026 8:41pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issues were found.

Summary

Keeps model-supplied tool arguments when block mappers read differently named fields.

  • Agent tool calls keep arguments that block fields otherwise overwrite.

Reviews (2) · Last reviewed commit: "fix(blocks): gate every agent fallback o..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/google_drive.ts Resolved
Comment thread apps/sim/blocks/blocks/google_drive.ts Resolved
Comment thread apps/sim/blocks/blocks/gmail.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 17 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

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.

1 participant