Skip to content

fix(google-drive): keep the page token an agent passes - #10008

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/drive-agent-page-token
Nov 13, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/drive-agent-page-token

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • On an agent tool call the stored tool keeps its operation on the tool, not in the args the block mapper receives. So params.operation is undefined there, and the Drive mapper's last branch (params.operation !== 'list') set pageToken to undefined. The block's output is spread over the model's args, so every agent call to list, search, list permissions, list revisions or list comments lost the model's page token and returned the first page.
  • That branch now falls back to the agent's own token (context?.operation ? pageToken : undefined), the same agentPageToken the dedicated per-operation tokens already use.
  • Canvas runs pass no context, so a stale list token is still dropped for every other operation and the canvas request is unchanged.

Type of Change

  • Bug fix

Testing

  • blocks/blocks/google_drive.test.ts:
    • New cases call the mapper with the operation only in the context (the real agent shape) for all five paginated operations. They fail on staging and pass with the fix.
    • Added a canvas case for a stale token under a non-paginating operation.
  • blocks/blocks.test.ts passes.
  • check-block-registry origin/staging, check:utils, check:test-patterns, check:explicit-any, check:comment-hygiene and check:docs pass, plus lint and type-check in the pre-push hook.

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)

@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 Skipped Skipped Nov 13, 2026 9:04pm UTC

Request Review

@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 2 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

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Preserves an agent’s pageToken when the selected operation is supplied through context rather than arguments.

  • Google Drive agent calls keep their page token across pages.

Reviews (1) · Last reviewed commit: "fix(google-drive): keep the page token a..." · Reviewed by Greptile

This branch was previously deployed

1 inactive deployment
Preview — fe0c2a98 Deployed Nov 13, 2026 by vercel[bot]
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