Skip to content

MCP OAuth tokens expire in idle conversations with no way to re-authenticate #18442

Closed as duplicate

Description

@bonecondor

Problem

When a Claude desktop conversation using MCP servers (like "Control your Mac" via osascript) sits idle for several hours, the OAuth tokens expire. Returning to the conversation results in:

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."}}

Expected behavior

  • Tokens should auto-refresh when returning to a conversation
  • OR /login should actually re-authenticate the MCP connections

Actual behavior

  • Running /login does nothing visible and subsequent messages still fail with 401
  • There is no way to revive MCP connections in a stale conversation
  • Users must start a new conversation and lose context

Impact

This defeats the purpose of conversation persistence. Users can't step away overnight and resume work the next day without losing their MCP-enabled context.

Activity

  1. added
    bug
    has repro
    on Jan 15, 2026
  2. github-actions commented on Jan 15, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. Bug: /login Does Not Recover Active Session After OAuth Token Expiration #15007
    2. [BUG] OAuth token expiration disrupts autonomous workflows – refresh token handling needed #12447
    3. [Bug] OAuth token expiration causing repeated 401 authentication errors during active sessions #18225

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  3. added
    duplicate
    and removed
    bug
    has repro
    on Jan 19, 2026
  4. github-actions commented on Jan 19, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #15007.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  5. github-actions commented on Jan 26, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  6. locked as resolved and limited conversation to collaborators on Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions