Skip to content

Google Calendar integration: chronic token failures (58 errors/week since Dec 2025) #6556

@beastoin

Description

@beastoin

Observed

GCP Error Reporting shows chronic failures in calendar tool functions:

  • calendar_tools.py:838 create_calendar_event — 36 hits in last 7 days (since Dec 2025)
  • calendar_tools.py:628 get_calendar_events — 22 hits in last 7 days (since Dec 2025)

Both call google_api_request() (google_utils.py:74) which makes HTTP requests to Google Calendar API. Failures include expired/revoked OAuth tokens and API errors.

Code path

  1. Tool function calls google_api_request("POST"/"GET", ..., access_token)
  2. On failure, catch block at :868/:635 attempts token refresh only on "Authentication failed" or "401" in error message
  3. Other failure modes (token revocation with non-401 codes, rate limits, network errors) are unhandled — they return generic error messages to the LLM agent
  4. refresh_google_token() (google_utils.py:15) relies on stored refresh_token — if revoked by user in Google account, refresh silently fails

Impact

~58 errors/week for 4+ months. Users with broken calendar integration get no notification that their connection needs reconnecting. The AI agent silently fails calendar operations.

Data source

GCP Error Reporting, backend service, last 7 days (observed pattern extends back to Dec 2025).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Priority: Important (score 14-21)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions