MCP client OAuth sessions expire after a hardcoded 30 days with no refresh token#26748
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_TTLinEnvironmentAuth.tsis hardcoded todays(30).- The server supports only the
authorization_codegrant 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:
- Issue refresh tokens (
refresh_tokengrant), so that clients renew without a person signing in again. This is the preferred option. - 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.
This conversation has been locked.