From f4444cbd22d804ccc95345f2a86a494099b332ab Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 8 May 2026 11:17:38 -0500 Subject: [PATCH] Fix: pass only authorized http to build(), not credentials, so timeout applies to API calls --- agentclaw/app/agent_claw_main/tools/google_workspace.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agentclaw/app/agent_claw_main/tools/google_workspace.py b/agentclaw/app/agent_claw_main/tools/google_workspace.py index 8fb2703..ab261bb 100644 --- a/agentclaw/app/agent_claw_main/tools/google_workspace.py +++ b/agentclaw/app/agent_claw_main/tools/google_workspace.py @@ -53,8 +53,11 @@ def _actor_id(): def _svc(api: str, version: str, creds: Credentials): + # Pass ONLY the authorized http (with timeout) — do NOT also pass credentials. + # When both http= and credentials= are given, google-api-python-client creates a + # new un-timed Http() from credentials for API calls, ignoring our timeout. http = creds.authorize(httplib2.Http(timeout=_HTTP_TIMEOUT)) - return build(api, version, http=http, credentials=creds, cache_discovery=False) + return build(api, version, http=http, cache_discovery=False) @tool