Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Closest existing reports: #5437 and #6162 (per-thread "Reload agent session"; the PR was closed until the V2 provider rewrite), #10955 (Stop kills the Claude CLI and --resumes), and anthropics/claude-code#81042 (the same limit in Claude Code, closed as not planned).
Area
apps/server
Steps to reproduce
- Configure an OAuth HTTP MCP server for a project, for example
https://mcp.linear.app/mcpin.mcp.json. - Start a Claude Code thread in that project while the server needs authentication. One way: let the OAuth grant expire. Linear's hosted MCP ends each grant 25 days after login.
- In a terminal
claudesession that uses the same config directory, run/mcpand authenticate the server. The result isAuthentication successful. Connected to <server>. - Send a new message in the T3 thread.
Expected behavior
The thread can use the server again without losing its conversation. For example, a thread action or an agent-callable tool reconnects one MCP server in the live session.
The Agent SDK that T3 bundles already supports this on the Query object: reconnectMcpServer(serverName), and mcpAuthenticate(serverName, redirectUri) with mcpSubmitOAuthCallbackUrl(serverName, callbackUrl) for a login from inside the thread. A reconnect in place also keeps the prompt cache, which a Stop and --resume rewrites (#10955).
Actual behavior
The thread does not get the server's tools back. The new tokens are in the shared credential store, and every new claude process connects with them. But the thread's running process connected its MCP servers once, at start, and nothing tells it to reconnect.
At main @ 7ac952c, apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:788-797 sends T3's own MCP servers over the control channel with queryRuntime.setMcpServers(mcpServers). No code in the repository calls reconnectMcpServer, mcpAuthenticate, or mcpSubmitOAuthCallbackUrl. The bundled 0.0.46-nightly.20261013.3066 binary has the same three methods and no call sites.
This happens with each project that has its own Linear workspace server. Each grant lapses on its own 25-day schedule, so it happens regularly.
Impact
Major degradation or frequent failure
Version or commit
0.0.46-nightly.20261013.3066; code read at main @ 7ac952c
Environment
Ubuntu Linux (kernel 7.0.0), T3 Code server via the t3 CLI on Node 24.20.0, Claude Code 2.1.299, Claude Opus 5.5
Logs or stack traces
Claude Code MCP log (~/.cache/claude-cli-nodejs/<project>/mcp-logs-<server>/) of the process that lost the server. Its refresh failed when the grant expired, so it cleared the tokens:
2026-10-14T05:35:43.224Z Token expires in -45247s, attempting proactive refresh
2026-10-14T05:35:43.732Z Token refresh failed with invalid_grant: Grant not found
2026-10-14T05:35:43.739Z No valid tokens in storage, clearing stored tokens
2026-10-14T05:35:44.140Z HTTP Connection failed after 919ms: Unauthorized (code: none, errno: none)
2026-10-14T05:35:44.141Z Authentication required for HTTP serverA thread that T3 resumed in a new process (--resume=<session>) connects again at start:
2026-10-14T13:42:53.923Z Token expires in -78708s, attempting proactive refresh
2026-10-14T13:42:54.961Z Token refresh successful
2026-10-14T13:42:55.306Z Successfully connected (transport: http) in 1390msWorkaround
- Authenticate the server in a terminal with
/mcp. - In the T3 thread, send any message and press Stop while the turn runs. Stop closes the CLI ([Bug]: Stop still kills the Claude CLI and
--resumes, so every Stop rewrites the full prompt cache (not covered by #10689) #10955). - Send the real message. T3 resumes the conversation in a new process, which connects with the new tokens.
Do the steps in this order. A thread that restarts before you authenticate skips the server again. The first turn after the Stop rewrites the full prompt cache.
Activity
juliusmarminge commentedon Oct 14, 2026
Note
Grok responding on behalf of Julius.
This is a feature request rather than a bug, so it belongs in Ideas. A Claude session connects its MCP servers once, when the process starts. Main has no in-session reconnect yet, and nothing on main is behaving incorrectly.
Your Stop-then-resend workaround is the supported path today: it starts a new process with
--resume, and that process picks up the new tokens. A per-thread reconnect was tried in #8737 (/reconnect-mcp) and #6162. Both were closed while the provider layer was rewritten for V2, and Claude Code itself declined this in anthropics/claude-code#81042.A reconnect in place built on the SDK's
reconnectMcpServer(keeping the prompt cache) is a reasonable proposal for V2. I'm moving this to an Ideas discussion, which is where to vote and add details.bz123456-a commentedon Oct 15, 2026
this is a huge issue for me too, since the last update i am having huge issues with linear although am authenticated and connected on the CLI