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.
Area
apps/server
Steps to reproduce
- Run T3 server long-lived (launchd service
t3 serve) with a Cursor provider instance. - Configure one OAuth remote MCP server in ~/.cursor/mcp.json (Atlassian: https://mcp.atlassian.com/v2/mcp).
- Let T3 run Cursor threads that use it for a while (days), so its OAuth client/tokens are loaded in the server process.
- Re-authenticate from a terminal:
cd <project> && agent mcp login atlassian. It reaches ready and saves a new client + tokens to ~/.cursor/projects//mcp-auth.json. - Start a new T3 thread on that project.
Expected behavior
The new thread's agent uses the freshly saved login and has the atlassian MCP tools.
Actual behavior
Within seconds of the new thread starting, mcp-auth.json is rewritten with an OAuth client id that no cursor-agent process ever saved, combined with an older access/refresh token. Atlassian rejects the refresh (refresh_token is invalid / unauthorized_client), the agent registers yet another client, and the login is wiped. New threads only get the cursor and t3-code namespaces (namespace "atlassian" not found). Every re-login is undone by the next thread start. Threads that resume an older agent session keep working.
sudo fs_usage -w -f filesys | grep mcp-auth shows the writer is the T3 server process itself (t3), not cursor-agent and not the Cursor IDE:
open F=187 (WC_T______X) ~/.cursor/projects//mcp-auth.json t3.9975
WrData[A] ... ~/.cursor/projects//mcp-auth.json W t3.9975
open F=180 (WC_T______X) ~/.cursor/projects//mcp-auth.json t3.9974
WrData[A] ... ~/.cursor/projects//mcp-auth.json W t3.9974
Looks like the in-process Cursor SDK in t3 serve keeps its own in-memory copy of mcp-auth.json and writes the whole file back (new clientInfo + stale tokens) when a new agent registers a client, instead of re-reading the file from disk first.
Impact
Major degradation or frequent failure
Version or commit
t3 serve 0.1.9 (~/.t3/runtime/versions/0.1.9), running ~6 days before the bug was noticed
Environment
macOS (Mac mini, accessed as a linked remote environment from another Mac), Cursor provider, cursor-agent CLI 2026.11.11-b912975, model grok-4.7, Atlassian Rovo MCP via OAuth (DCR)
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Stop the T3 service (launchctl bootout gui/$(id -u)/com.t3tools.t3code.service), run agent mcp login atlassian from the project dir, wait ~60 s, start the service again (launchctl bootstrap ...). Fresh t3 serve reads the new login and new threads get the tools. Expected to recur once tokens rotate again. Switching the MCP server to static API-token auth avoids it.
Activity