[BUG] GUI chat re-prompts for auth on every message — EPERM rename error prevents token persistence on Windows

Resolved 💬 3 comments Opened Feb 20, 2026 by amilgodzali-source Closed Feb 24, 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?

The Claude Code VS Code extension GUI chat panel re-prompts for authentication on every message sent. The root cause is a Windows-specific EPERM error during atomic file rename of ~/.claude.json, which causes the config (including the OAuth token) to be reset to defaults on every GUI startup. The CLI in terminal works correctly throughout.

What Should Happen?

After successful OAuth authentication, the GUI chat should persist the session and accept messages without re-authenticating.

Error Messages/Logs

[ERROR] Failed to save config with lock: Error: Lock file is already being held
[DEBUG] Failed to write file atomically: Error: EPERM: operation not permitted, rename '.claude.json.tmp' -> '.claude.json'
[ERROR] Config file corrupted, resetting to defaults: JSON Parse error: Unexpected EOF
[DEBUG] [claudeai-mcp] No access token
[ERROR] Could not resolve authentication method.

Steps to Reproduce

  1. Install Claude Code extension v2.1.49 in VS Code on Windows 11
  2. Open the Claude Code GUI chat panel
  3. Authenticate via browser (login succeeds)
  4. Type any message and send
  5. Extension re-prompts for authentication

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.49

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Proxy required: HTTP_PROXY=http://127.0.0.1:10808. Attempted fixes: set system env vars, VS Code http.proxy, Windows Defender exclusions, icacls permissions, full extension reinstall. None resolved the issue. CLI works correctly with same account.

View original on GitHub ↗

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