Claude Code OAuth token refresh races fixed with MCPProxy

docspring.com6 min read

Running multiple parallel Claude Code sessions can cause frequent OAuth re-authentication races when all sessions attempt to refresh expiring tokens simultaneously. The author resolved this by using a modified local proxy tool, MCPProxy, which centralizes authentication tokens and serializes refresh requests across all background sessions. Claude Code is then configured to route requests through this single local endpoint using static keys. Open article →