claude-code - 💡(How to fix) Fix [BUG] Gmail connector: thread search and message reading fail despite correct OAuth scopes (read works for labels/drafts, not messages [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47847Fetched 2026-04-15 06:40:40
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

Root Cause

No relevant local config files found in ~/Library/Application Support/Claude/claude-code — the issue is not caused by local configuration.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Summary

The Gmail MCP connector shows partial functionality: write operations and
label retrieval work correctly, but thread/message search and reading email content consistently fail. Claude reports this as a "scope limitation" even
though the required read scopes are fully granted.

Environment

  • Claude Code version: 2.1.101
  • Platform: macOS
  • Connector: Gmail (claude.ai integration)

What's working

  • Draft creation (write access)
  • Label retrieval

What's not working

  • Thread/message search (search_threads)
  • Reading email content (get_thread)

Expected behavior

All Gmail connector tools should function once the required OAuth scopes are
granted.

Actual behavior

Read operations on threads and messages fail. Claude attributes this to
missing scopes, but the scope "View your email messages and settings" is confirmed granted in Google Account settings.

Troubleshooting already performed

  • Removed and re-granted Google account access
  • Performed a fresh OAuth reconnect
  • Tested in incognito session
  • Retried across multiple days and sessions

Hypothesis

This appears to be a mismatch between the scopes granted by the user and how
the connector backend passes or validates those scopes when calling Gmail read endpoints. The fact that write/label operations succeed but message read
operations fail suggests the issue is server-side in the connector implementation, not a client-side configuration problem.

Additional context

No relevant local config files found in ~/Library/Application Support/Claude/claude-code — the issue is not caused by local configuration.

What Should Happen?

Claude should be able to read mails in Gmail.

Error Messages/Logs

Steps to Reproduce

  1. Connect Gmail account via Claude.ai integrations (OAuth flow)
  2. Confirm all requested permissions are granted, including "View your email messages and settings" in Google Account settings
  3. Open Claude Code or Claude.ai and attempt to use the Gmail connector
  4. Try creating a draft or retrieving labels — these succeed
  5. Try searching threads (e.g. "search my emails for X") — this fails
  6. Try reading an email thread — this fails
  7. Note that Claude reports the failure as a scope/permission issue
    despite scopes being confirmed as granted

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue is likely due to a mismatch between the scopes granted by the user and how the connector backend passes or validates those scopes when calling Gmail read endpoints, and downgrading to a previous version of Claude Code may resolve the issue.

Guidance

  • Verify that the "View your email messages and settings" scope is correctly granted in Google Account settings and that the scope is being passed correctly to the Gmail API.
  • Check the Claude Code documentation to see if there are any known issues or updates related to the Gmail connector and scope validation.
  • Attempt to reproduce the issue with a different Gmail account or a different Claude Code configuration to isolate the problem.
  • Consider downgrading to a previous version of Claude Code, as the issue is reported to have worked in a previous version.

Example

No code snippet is provided as the issue is related to the Claude Code configuration and Gmail API interaction.

Notes

The issue is reported to be a regression, and the last working version is not specified. The problem may be specific to the Sonnet model or the macOS platform.

Recommendation

Apply workaround: Downgrade to a previous version of Claude Code, as the issue is reported to have worked in a previous version. This may resolve the issue until a fix is available in a future version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING