Skip to content

Atomic replace failed os error 50 - cc-switch

Quick fix

Change the Claude Code configuration directory from a WSL path back to a Windows local path, or roll back to v3.19.0.

Error output
更新供应商失败:同步 Claude Live 配置失败: 写入 Claude 配置失败: 原子替换失败: \\wsl.localhost\Ubuntu-24.04\home\f\.claude\settings.json.tmp.25844.1786072807352757000.15 -> \\wsl.localhost\Ubuntu-24.04\home\f\.claude\settings.json: 不支持该请求。 (os error 50)
English translation

Update provider failed: Sync Claude Live configuration failed: Write Claude configuration failed: Atomic replace failed: \\wsl.localhost\Ubuntu-24.04\home\f\.claude\settings.json.tmp.25844.1786072807352757000.15 -> \\wsl.localhost\Ubuntu-24.04\home\f\.claude\settings.json: The request is not supported. (os error 50)

In cc-switch v3.19.2, saving a provider configuration writes `settings.json` via atomic replace. This mechanism first writes a temporary file, then renames it to the target file. However, the Windows file system does not support atomic rename operations across WSL network paths (such as `\\wsl.localhost\...`), so it triggers `os error 50` (The request is not supported), causing the save to fail. Rolling back to v3.19.0 avoids this issue because the older version does not use this write mechanism.

  1. Change the cc-switch Claude Code configuration directory from a WSL path (such as \\wsl.localhost\Ubuntu-24.04\home\f\.claude) to a Windows local path.

    // ~/.cc-switch/settings.json
    "claudeConfigDir": "\\\\wsl.localhost\\Ubuntu-24.04\\home\\f\\.claude"
    "claudeConfigDir": "C:\\Users\\<你的用户名>\\.claude"
  2. If you must use a WSL path, roll back cc-switch to v3.19.0.

ToolClaude Code
Version3.19.2(受影响版本,v3.19.0 不受影响)
PlatformsWindows
Why does v3.19.0 save normally, but upgrading to v3.19.2 causes an error?
v3.19.2 introduced a new atomic replace write mechanism, and the Windows system does not support atomic rename operations on WSL network paths, so it errors. v3.19.0 uses the older direct write method, which does not involve rename operations.
Besides rolling back the version, are there other solutions?
Yes. You can change the Claude Code configuration directory from a WSL path back to a Windows local path (such as C:\\Users\\<用户名>\\.claude), so the atomic replace operation can execute normally on the local file system.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.