[BUG] MCP server shows "Needs Auth" after VSCode restart despite valid token
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After closing and reopening VSCode, the Atlassian Rovo MCP server displays a "⚠ Needs Auth" badge with an "Authenticate" button, implying the OAuth token has expired. Clicking "Authenticate" launches a full browser re-auth flow. But this isn't necessary — clicking "Reconnect" (or checking connection) instead succeeds immediately and reconnects without any re-authentication, proving the underlying token is still valid.
This means the extension's startup auth-status check is producing a false "unauthenticated" result — likely a race or stale-state check on load — rather than actually validating the stored credentials. The connection panel should reflect the true auth state, and reconnect should be offered before (or instead of) prompting a full re-auth.
What Should Happen?
It should authenticate my mcp server on load unless its truly needs re-authentication.
Error Messages/Logs
Steps to Reproduce
In VSCode, connect an MCP server that uses OAuth (e.g. claude.ai Atlassian Rovo) and confirm it shows "✓ Connected".
Close VSCode completely.
Reopen VSCode.
Open the MCP servers panel.
Observe the server now shows "⚠ Needs Auth" with an "Authenticate" button.
Instead of clicking "Authenticate", click "Reconnect" (or the check-connection action).
Observe it reconnects immediately to "✓ Connected" with no browser/OAuth prompt — showing the token was valid all along and step 5's status was wrong.
Expected: Panel shows "Connected" (or silently reconnects) on startup without a false "Needs Auth" state.
Actual: Panel falsely reports "Needs Auth" every restart; only resolved by manually clicking reconnect.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
i'm not sure its been happening for the past 3 weeks
Claude Code Version
2.1.239
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
This is error is in Claude code for vs code. Note this is similar to the https://github.com/anthropics/claude-code/issues/55021 microsoft 365 bug that was reported.
<img width="444" height="380" alt="Image" src="https://github.com/user-attachments/assets/5850c0b0-8d24-4d57-94d5-87cb160c8948" />
<img width="444" height="380" alt="Image" src="https://github.com/user-attachments/assets/d30677a3-a2d5-4141-babd-4332bf3d94da" />
<img width="444" height="380" alt="Image" src="https://github.com/user-attachments/assets/9cf76649-2746-43a3-9d6c-69c4d66ebfb0" />