[BUG] Gmail MCP connector: search_threads returns persistent "Internal error encountered"

Resolved 💬 2 comments Opened Apr 12, 2026 by byjonathanng Closed May 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Gmail MCP connector's search_threads tool returns "Internal error encountered" on every invocation in Cowork (Claude Desktop), regardless of query parameters. The issue is persistent — not intermittent — and has been occurring since at least April 9, 2026.

All other Gmail MCP tools (list_drafts, get_thread, list_labels, create_draft) work correctly on the same connector session, confirming the OAuth token and authentication are valid. The issue is isolated to search_threads.

Queries tested (all fail identically):

  • No query (empty)
  • is:unread
  • in:inbox
  • newer_than:2d
  • Various pageSize values (10, 15, 20)

Working Gmail tools (same session, same auth):

| Tool | Status |
|------|--------|
| list_drafts | ✅ Works |
| get_thread | ✅ Works |
| list_labels | ✅ Works |
| create_draft | ✅ Works |
| search_threads | ❌ "Internal error encountered" |

Timeline:

  • First observed: April 9, 2026
  • Confirmed broken: April 9, 10, 11, and 12, 2026
  • Frequency: 100% failure rate across all sessions (scheduled and interactive)

Impact: Four scheduled tasks depend on search_threads to pull inbox content. All have been degraded since April 9. Workaround implemented using list_draftsget_thread, but this only surfaces threads with existing drafts — it cannot discover new inbound emails.

What Should Happen?

search_threads should return matching Gmail threads (or an empty list if no matches), just like list_drafts and get_thread do on the same authenticated session. All Gmail MCP tools should function when the connector is authenticated.

Error Messages/Logs

Every call to search_threads returns:

"Internal error encountered."

No additional error message, stack trace, or error code is provided. The error is identical regardless of parameters passed.

Example calls that all return the same error:
- search_threads(query="is:unread", pageSize=20)
- search_threads(query="in:inbox", pageSize=10)
- search_threads(query="newer_than:2d", pageSize=15)
- search_threads() [no parameters]

Meanwhile, on the same session:
- list_drafts(pageSize=50) → returns drafts successfully
- get_thread(threadId="19d688eae00187a1") → returns full thread successfully
- list_labels() → returns labels successfully
- create_draft(...) → creates draft successfully

Steps to Reproduce

  1. Open any Cowork (Claude Desktop) session with the Gmail connector active and authenticated.
  2. Call search_threads with any parameters — e.g., search_threads(query="is:unread", pageSize=10).
  3. Observe: returns "Internal error encountered." with no additional details.
  4. Call list_drafts(pageSize=10) on the same session — this succeeds and returns results.
  5. Call get_thread(threadId="<any valid thread ID>") — this also succeeds.

This confirms the Gmail OAuth session is valid and the issue is isolated to the search_threads endpoint.

Note: This reproduces 100% of the time across all Cowork sessions (both interactive and scheduled tasks) since April 9, 2026.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Cowork (Claude Desktop) — version not available via CLI

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This bug is filed from Cowork (Claude Desktop), not Claude Code CLI. The Gmail connector is a first-party MCP integration within Claude.ai/Cowork.

Workaround currently in use: Using list_draftsget_thread chain to access email content. This only surfaces threads with existing drafts, so new inbound emails that haven't been replied to are invisible. This workaround has been deployed across 4 scheduled tasks to keep them partially functional while search_threads remains broken.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗