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.
Symptom
Section titled “Symptom”更新供应商失败:同步 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)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.
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"If you must use a WSL path, roll back cc-switch to v3.19.0.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- 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.
Related problems
Section titled “Related problems”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.