Skip to content

permissions.deny Overwritten Entirely Claude Code

Quick fix

Upgrade to cc-switch v4.0.0 or later; when switching providers, other settings.json content is preserved as is.

Error output
通用配置的数组整体替换了原数组,"WebSearch" 被静默丢弃,且取消勾选后不会还原:
English translation

The common configuration array replaces the entire original array, `"WebSearch"` is silently dropped, and it is not restored after unchecking:

In cc-switch 3.19.1, the “Apply common configuration” mechanism recursively merged objects but replaced arrays entirely when merging configuration, so `permissions.deny` in the common configuration overwrote the provider’s existing array. The maintainer stated that this merge mechanism was removed starting with v4.0.0; when switching providers, only key fields such as the address, credentials, and model are replaced, while other content in `settings.json`, including `permissions.deny`, is preserved as is.

  1. Upgrade to cc-switch v4.0.0 or a later version. The maintainer said the “Apply common configuration” merge mechanism was removed starting with this version.

  2. To share global settings, edit the configuration shown at the bottom of the provider editor; this content is written directly to `settings.json`.

ToolClaude Code
Version3.19.1(受影响;维护者称 v4.0.0 起该机制已移除)
PlatformsmacOS

(No FAQ yet)

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.