[BUG] Claude Code VS Code / Cursor extension stuck in infinite OAuth reconnect loop

Resolved 💬 3 comments Opened Jan 13, 2026 by mootezaloui Closed Feb 27, 2026

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?

Claude Code’s VS Code / Cursor extension is stuck in an infinite authentication loop.

When sending any message, the extension prompts me to “Connect”.
It opens the browser → I authorize successfully → I’m redirected back to VS Code/Cursor → all conversation history loads correctly → but the moment I send a message again, it immediately asks to reconnect again. This repeats forever.

The extension is effectively unusable.

What Should Happen?

Once authorized, the extension should retain authentication and allow normal message sending without repeated reconnect prompts.

Error Messages/Logs

OAuth authorization is not persisted.
Every message triggers a new authorization flow.

Steps to Reproduce

Install Claude Code extension in VS Code or Cursor

Click “Connect”

Browser opens → Authorize successfully

IDE reloads with full chat history visible

Send any message

“Connect” prompt appears again

Loop continues indefinitely

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.6

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Chat history loads correctly, so the session is clearly recognized, but sending messages always invalidates it.

This looks like a token persistence or session validation bug in the extension.

Multiple community reports indicate similar reconnect loops and session drops.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗