From 3cb3616bd85b83a7d780735e2bc5ece784e376fd Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Tue, 14 Jul 2026 08:09:09 +0400 Subject: [PATCH] fix(sync): shrink Gmail fetch page to avoid Composio 413 GMAIL_FETCH_EMAILS with include_payload=true returns full message bodies, so a 50-message page overflows Composio's tool-response size cap (HTTP 413 Payload Too Large). Lower the default page_size to 25, which stays under the cap while matching the default item budget. Verified live: gmail sync went from 413 to PASS with 25 documents ingested. Claude-Session: https://claude.ai/code/session_01AtynpEKn3QZJKZYvL8uDNR --- src/memory/sync/composio/gmail.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/memory/sync/composio/gmail.rs b/src/memory/sync/composio/gmail.rs index 75b28b3..0b1d9f2 100644 --- a/src/memory/sync/composio/gmail.rs +++ b/src/memory/sync/composio/gmail.rs @@ -29,7 +29,11 @@ impl GmailSyncPipeline { client, connection_id: connection_id.into(), max_pages: 10, - page_size: 50, + // Gmail fetches full message payloads (`include_payload: true`), so a + // large page overflows Composio's tool-response size cap with HTTP + // 413. 25 full messages/request stays comfortably under it; callers + // needing more throughput can raise it via `with_limits`. + page_size: 25, query_override: None, } }