Skip to content

MCP client OAuth sessions expire after a hardcoded 30 days with no refresh token #26748

Closed

Description

@justcarlson

Problem

The MCP clients that sign in to a T3 server through OAuth (outside agents, for example Claude Code or Codex on another host) lose access after 30 days. Each client must then sign in again by hand.

  • MCP_CLIENT_SESSION_TTL in EnvironmentAuth.ts is hardcoded to days(30).
  • The server supports only the authorization_code grant and issues no refresh token.
  • No setting, environment variable or CLI flag changes the TTL.

I checked this on 0.1.1-nightly.20261018.3315 and on 0.1.4-nightly.20261027.3796.

Request

One of these:

  1. Issue refresh tokens (refresh_token grant), so that clients renew without a person signing in again. This is the preferred option.
  2. Make the TTL configurable (server setting or env var).

Why

When a headless fleet host loses its MCP session, a person must do the pairing and consent flow on that host again. This repeats every 30 days for each host.

Activity

  1. locked and limited conversation to collaborators on Oct 29, 2026
  2. converted this issue into a discussion #26754 on Oct 29, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions