Skip to content

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

Description

@mootezaloui

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions