Multiple cc-switch.db Files When Syncing OneDrive Across Devices with Claude Code
Quick fix
Simultaneous database writes from multiple devices during OneDrive sync can create conflict copies; no verified fix was provided.
Symptom
Section titled “Symptom”我将两台设备的 cc switch 的配置目录放到了 onedrive 中, 但是没有预期使用同一份数据库, 而是新建一个 cc-switch-<hostname>.dbI placed the cc switch configuration directories from two devices in onedrive, but they did not use the same database as expected. Instead, it created a new cc-switch-<hostname>.db.
In this report, two devices opened and wrote to the same `cc-switch.db` through OneDrive at the same time. A comment explains that the cloud-sync mechanism detected a concurrent-write conflict and automatically created conflict-copy files distinguished by device name: `cc-switch-设备名.db`.
The issue is closed, but neither the original post nor the comments record a verified fix or say whether closure means the issue was resolved.
The original post does not provide a verified fix; follow the source issue for further discussion of OneDrive sync conflicts.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
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.