Skip to main content

claude_code_settings/
settings.rs

1//! [`Settings`]: the settings.json document.
2
3use alloc::collections::BTreeMap;
4use alloc::string::String;
5use alloc::vec::Vec;
6
7use serde::{Deserialize, Deserializer, Serialize};
8
9use crate::Extra;
10use crate::enums::{
11    CacheTtl, DialogTimeout, DiffTool, DisableFlag, DisabledFlag, EditorMode, EffortLevel,
12    FeedbackDrafts, InboundMode, KeybindingFlavor, LoginMethod, ModelMatch, NotifChannel, Provider,
13    Shell, SkillOverride, SourcesBehavior, TeammateMode, Theme, TimeFormat, Tui, UpdatesChannel,
14    ViewMode, WorkflowSize,
15};
16use crate::hooks::Hooks;
17use crate::models::{ModelPicker, ModelPricing, ModelSettings};
18use crate::permissions::{AutoMode, McpServerRule, Permissions};
19use crate::plugins::{
20    ChannelPluginEntry, Marketplace, PluginConfig, PluginEnabled, Source, StrictCustomization,
21};
22use crate::sandbox::Sandbox;
23use crate::types::{
24    AttributionSetting, CommandSetting, FooterLink, ManagedMcpServers, OneOrMany, PolicyHelper,
25    Remote, Spellcheck, SpinnerTips, SpinnerVerbs, SshConfig, SshHostCommand, StatusLine, Voice,
26    Worktree,
27};
28use crate::walk::{Unknown, walk};
29
30/// Claude Code's settings.json: one settings file, a `--settings`
31/// document, or the merge of several.
32///
33/// Every key is an `Option`, written only when `Some`, so a document says
34/// only what it sets and Claude Code's own default applies to the rest;
35/// each field's docs give that default. Keys this crate doesn't model (a
36/// newer Claude Code's, or undocumented ones) are kept in
37/// [`extra`](Self::extra) and written back, so a document round-trips.
38///
39/// The struct is `#[non_exhaustive]`, so new keys can be added without a
40/// breaking release: build one from [`Settings::default()`] and set its
41/// fields.
42///
43/// ```
44/// use claude_code_settings::{PermissionMode, Permissions, Settings};
45///
46/// let mut permissions = Permissions::default();
47/// permissions.default_mode = Some(PermissionMode::AcceptEdits);
48///
49/// let mut settings = Settings::default();
50/// settings.model = Some("sonnet".into());
51/// settings.permissions = Some(permissions);
52/// assert_eq!(
53///     settings.to_json_string()?,
54///     r#"{"permissions":{"defaultMode":"acceptEdits"},"model":"sonnet"}"#,
55/// );
56/// # Ok::<(), serde_json::Error>(())
57/// ```
58///
59/// Docs: [settings reference](https://code.claude.com/docs/en/settings-reference).
60#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
61#[serde(rename_all = "camelCase")]
62#[non_exhaustive]
63pub struct Settings {
64    /// JSON Schema reference for Claude Code settings.
65    ///
66    /// - **Values**: string
67    /// - **Default**: unset
68    ///
69    /// Docs: not in the settings reference; listed in the
70    /// [JSON schema](https://json.schemastore.org/claude-code-settings.json).
71    #[serde(skip_serializing_if = "Option::is_none", rename = "$schema")]
72    pub schema: Option<String>,
73    /// Run your own command to produce the credential Claude Code sends with model requests.
74    /// Claude Code runs the command through the system shell, `/bin/sh` on macOS and Linux and
75    /// `cmd` on Windows, and sends its output as both the `X-Api-Key` and `Authorization:
76    /// Bearer` headers. Use it for dynamic or rotating credentials, such as short-lived tokens
77    /// fetched from a vault.
78    ///
79    /// - **Values**: string, a shell command line
80    /// - **Default**: unset, so Claude Code doesn't run a helper
81    /// - **Scope**: any settings file.
82    ///
83    /// Docs: [`apiKeyHelper`](https://code.claude.com/docs/en/settings-reference#apikeyhelper).
84    #[serde(skip_serializing_if = "Option::is_none")]
85    pub api_key_helper: Option<String>,
86    /// Turn [auto memory](https://code.claude.com/docs/en/memory#enable-or-disable-auto-memory)
87    /// on or off. When `false`, Claude doesn't read from or write to the auto memory directory.
88    /// You can also toggle it with `/memory` during a session, which writes this key to your
89    /// user settings.
90    ///
91    /// - **Values**: Boolean
92    ///   - `true`: the same as unset; auto memory stays on unless something that outranks this
93    ///     key turns it off for the session, such as `--bare`, safe mode, or
94    ///     `CLAUDE_CODE_DISABLE_AUTO_MEMORY`
95    ///   - `false`: Claude doesn't read from or write to the auto memory directory
96    /// - **Default**: `true`
97    /// - **Scope**: any settings file.
98    ///
99    /// Docs: [`autoMemoryEnabled`](https://code.claude.com/docs/en/settings-reference#automemoryenabled).
100    #[serde(skip_serializing_if = "Option::is_none")]
101    pub auto_memory_enabled: Option<bool>,
102    /// Choose which [release
103    /// channel](https://code.claude.com/docs/en/setup#configure-release-channel) background
104    /// auto-updates and `claude update` follow. Set `"stable"` for a version that is typically
105    /// about one week old and skips releases with major regressions, or `"latest"` for the most
106    /// recent release.
107    ///
108    /// - **Values**: string, one of:
109    ///   - `"latest"`: updates follow the most recent release
110    ///   - `"stable"`: updates follow a version that is typically about one week old and skips
111    ///     releases with major regressions
112    /// - **Default**: unset, so Claude Code follows `"latest"`
113    /// - **Scope**: any settings file. Set it in managed settings to enforce one channel across
114    ///   your organization.
115    ///
116    /// Docs: [`autoUpdatesChannel`](https://code.claude.com/docs/en/settings-reference#autoupdateschannel).
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub auto_updates_channel: Option<UpdatesChannel>,
119    /// Run your own command that prints AWS credentials as JSON, so Claude Code can call
120    /// [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock) with credentials that
121    /// don't live in your `.aws` directory. Claude Code accepts the `aws sts` output shape and
122    /// the flat `aws configure export-credentials` shape, and scopes the credentials to its own
123    /// Bedrock client, so the shell commands Claude runs still see your ambient credentials.
124    ///
125    /// - **Values**: string, a shell command line
126    /// - **Default**: unset, so Claude Code uses the ambient AWS credential chain
127    /// - **Scope**: any settings file.
128    ///
129    /// Docs: [`awsCredentialExport`](https://code.claude.com/docs/en/settings-reference#awscredentialexport).
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub aws_credential_export: Option<String>,
132    /// Run your own command, such as `aws sso login`, to refresh the credentials in your `.aws`
133    /// directory when the ones Claude Code has for [Amazon
134    /// Bedrock](https://code.claude.com/docs/en/amazon-bedrock) stop working. Claude Code
135    /// checks the current credentials against STS first and runs the command only when that
136    /// check fails, then reads the refreshed `.aws` directory. When the check fails at the same
137    /// time in several Claude Code processes that use the same command and credentials, such as
138    /// separate terminals or IDE windows, one process runs the command and the rest wait for
139    /// that run instead of starting their own.
140    ///
141    /// - **Values**: string, a shell command line
142    /// - **Default**: unset, so Claude Code doesn't refresh AWS credentials for you
143    /// - **Scope**: any settings file.
144    ///
145    /// Docs: [`awsAuthRefresh`](https://code.claude.com/docs/en/settings-reference#awsauthrefresh).
146    #[serde(skip_serializing_if = "Option::is_none")]
147    pub aws_auth_refresh: Option<String>,
148    /// Skip specific `CLAUDE.md` files when Claude Code loads
149    /// [memory](https://code.claude.com/docs/en/memory#exclude-specific-claude-md-files). In a
150    /// large monorepo, use it to skip CLAUDE.md files from other teams that aren't relevant to
151    /// your work; [Exclude irrelevant CLAUDE.md
152    /// files](https://code.claude.com/docs/en/large-codebases#exclude-irrelevant-claude-md-files)
153    /// in the large-codebases guide walks through that case. Patterns match against absolute
154    /// file paths.
155    ///
156    /// - **Values**: array of strings, each a glob pattern or absolute path
157    /// - **Default**: unset, so Claude Code loads every CLAUDE.md it finds
158    /// - **Scope**: any settings file.
159    ///
160    /// Docs: [`claudeMdExcludes`](https://code.claude.com/docs/en/settings-reference#claudemdexcludes).
161    #[serde(skip_serializing_if = "Option::is_none")]
162    pub claude_md_excludes: Option<Vec<String>>,
163    /// Set how many days Claude Code keeps [session transcripts and other application
164    /// data](https://code.claude.com/docs/en/claude-directory#cleaned-up-automatically) before
165    /// deleting them. Claude Code runs the deletion as a background sweep after a session
166    /// starts, as long as it can safely determine the retention period. The sweep deletes
167    /// transcripts without showing a message, so a session you haven't used for longer than the
168    /// retention period no longer appears in the
169    /// [`/resume`](https://code.claude.com/docs/en/sessions#resume-a-session) picker.
170    ///
171    /// - **Values**: number of days, a whole number, minimum `1`
172    /// - **Default**: `30`
173    /// - **Scope**: any settings file.
174    ///
175    /// Docs: [`cleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#cleanupperioddays).
176    #[serde(skip_serializing_if = "Option::is_none")]
177    pub cleanup_period_days: Option<u64>,
178    /// Set environment variables for every session and for the subprocesses Claude Code starts
179    /// from it. Most variables in the [environment variables
180    /// reference](https://code.claude.com/docs/en/env-vars) can go here, which is how you apply
181    /// one to every session or roll it out to your team. Project and local settings can't set
182    /// [some of
183    /// them](https://code.claude.com/docs/en/settings-reference#variables-claude-code-ignores-in-env).
184    ///
185    /// - **Values**: object mapping variable names to string values
186    /// - **Default**: unset
187    /// - **Scope**: any settings file.
188    ///
189    /// Docs: [`env`](https://code.claude.com/docs/en/settings-reference#env).
190    #[serde(skip_serializing_if = "Option::is_none")]
191    pub env: Option<BTreeMap<String, String>>,
192    /// Customize the attribution Claude Code adds to git commits and pull requests. Commits get
193    /// a [git trailer](https://git-scm.com/docs/git-interpret-trailers) such as
194    /// `Co-Authored-By` by default; pull request descriptions get plain text. Set each part
195    /// separately with the sub-keys below.
196    ///
197    /// - **Values**: object with `commit` and `pr` strings and a `sessionUrl` Boolean, or
198    ///   `false` to hide all attribution. The `false` value requires Claude Code v2.1.281 or
199    ///   later; earlier versions reject it and [skip the whole user, project, or local settings
200    ///   file](https://code.claude.com/docs/en/settings#fix-a-broken-settings-file) that holds
201    ///   it
202    /// - **Default**: unset, so Claude Code uses the standard attribution shown under each
203    ///   sub-key
204    /// - **Scope**: any settings file.
205    ///
206    /// Docs: [`attribution`](https://code.claude.com/docs/en/settings-reference#attribution).
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub attribution: Option<AttributionSetting>,
209    /// Claude Code gives Claude two git-related pieces of context: its built-in instructions
210    /// for how to write commits and pull requests, in the Bash tool's description, and a git
211    /// status snapshot of your repository. The snapshot holds the current branch, the main
212    /// branch, `git status` output, and recent commits. Claude Code reads it when a
213    /// conversation starts.
214    ///
215    /// - **Values**: Boolean
216    ///   - `true`: Claude Code includes its built-in commit and pull request workflow
217    ///     instructions and the git status snapshot. Cloud sessions never include the snapshot
218    ///   - `false`: Claude Code leaves both out
219    /// - **Default**: `true`
220    /// - **Scope**: any settings file.
221    ///
222    /// Docs: [`includeGitInstructions`](https://code.claude.com/docs/en/settings-reference#includegitinstructions).
223    #[serde(skip_serializing_if = "Option::is_none")]
224    pub include_git_instructions: Option<bool>,
225    /// **Warning:** Deprecated since v2.0.62, when
226    /// [`attribution`](https://code.claude.com/docs/en/settings-reference#attribution) replaced
227    /// it. Claude Code still reads it, but new configurations should set `attribution`. Use
228    /// [`attribution`](https://code.claude.com/docs/en/settings-reference#attribution) instead,
229    /// which replaces this key and lets you change or hide the commit trailer, the pull request
230    /// text, and the session link separately.
231    ///
232    /// - **Values**: Boolean
233    ///   - `true`: the same as unset; Claude Code adds the commit trailer and the pull request
234    ///     attribution text
235    ///   - `false`: Claude Code omits both the commit trailer and the pull request attribution
236    ///     text, unless `attribution` sets `commit` or `pr`, in which case the
237    ///     [`attribution`](https://code.claude.com/docs/en/settings-reference#attribution)
238    ///     rules apply
239    /// - **Default**: `true`
240    /// - **Scope**: any settings file.
241    ///
242    /// Docs: [`includeCoAuthoredBy`](https://code.claude.com/docs/en/settings-reference#includecoauthoredby).
243    #[serde(skip_serializing_if = "Option::is_none")]
244    pub include_co_authored_by: Option<bool>,
245    /// Choose where Claude Code stores the plan files it writes in [plan
246    /// mode](https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode).
247    /// Claude Code resolves the path relative to the project root.
248    ///
249    /// - **Values**: string, a path relative to the project root
250    /// - **Default**: unset, so Claude Code uses `~/.claude/plans`
251    /// - **Scope**: any settings file.
252    ///
253    /// Docs: [`plansDirectory`](https://code.claude.com/docs/en/settings-reference#plansdirectory).
254    #[serde(skip_serializing_if = "Option::is_none")]
255    pub plans_directory: Option<String>,
256    /// Control whether the `@` file picker leaves out files that match `.gitignore` patterns.
257    /// Appears in `/config` as **Respect .gitignore in file picker**.
258    ///
259    /// - **Values**: Boolean
260    ///   - `true`: the `@` file picker leaves out files that match `.gitignore` patterns
261    ///   - `false`: the `@` file picker includes files that match `.gitignore` patterns
262    /// - **Default**: `true`
263    /// - **Scope**: any settings file. When no settings file sets it, Claude Code falls back to
264    ///   `respectGitignore` in `~/.claude.json`, which the `/config` toggle writes.
265    ///
266    /// Docs: [`respectGitignore`](https://code.claude.com/docs/en/settings-reference#respectgitignore).
267    #[serde(skip_serializing_if = "Option::is_none")]
268    pub respect_gitignore: Option<bool>,
269    /// Control which tools Claude can use without asking, which ones prompt, and which ones are
270    /// blocked. Also set the default [permission
271    /// mode](https://code.claude.com/docs/en/permission-modes) for new sessions. Every
272    /// `permissions.*` key below nests under this object.
273    ///
274    /// - **Values**: object with `allow`, `ask`, `deny`, `additionalDirectories`,
275    ///   `blockReadsOutsideWorkingDirectories`, `blockWritesOutsideWorkingDirectories`,
276    ///   `defaultMode`, `denyInsteadOfPrompting`, `disableBypassPermissionsMode`, and
277    ///   `disableAutoMode`
278    /// - **Default**: unset
279    /// - **Scope**: any settings file.
280    ///
281    /// Docs: [`permissions`](https://code.claude.com/docs/en/settings-reference#permissions).
282    #[serde(skip_serializing_if = "Option::is_none")]
283    pub permissions: Option<Permissions>,
284    /// Have Claude respond in a language other than English by default. There is no fixed list
285    /// for responses: Claude Code passes the value verbatim to Claude as an instruction to
286    /// always respond in that language, so any language name Claude can read works. Claude Code
287    /// doesn't check the value, so a misspelled name reaches Claude as written rather than
288    /// producing an error.
289    ///
290    /// - **Values**: string, any language name, such as `"japanese"`, `"spanish"`, or
291    ///   `"french"`; Claude Code doesn't validate it
292    /// - **Default**: unset; session titles then match the language of your conversation
293    /// - **Scope**: any settings file.
294    ///
295    /// Docs: [`language`](https://code.claude.com/docs/en/settings-reference#language).
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub language: Option<String>,
298    /// Set the model every new session uses, so you don't have to pick one with `/model` each
299    /// time. Setting it here doesn't stop you from switching mid-session. If your admin set an
300    /// [organization default
301    /// model](https://code.claude.com/docs/en/model-config#organization-default-model) to
302    /// override user selection, you get that model even when you set this key in user, project,
303    /// or local settings.
304    ///
305    /// - **Values**: string, a model alias or full model ID
306    /// - **Default**: unset, so Claude Code uses your account's default model
307    /// - **Scope**: any settings file.
308    ///
309    /// Docs: [`model`](https://code.claude.com/docs/en/settings-reference#model).
310    #[serde(skip_serializing_if = "Option::is_none")]
311    pub model: Option<String>,
312    /// Restrict which models people can select for the main session,
313    /// [subagents](https://code.claude.com/docs/en/sub-agents),
314    /// [skills](https://code.claude.com/docs/en/skills), and the
315    /// [advisor](https://code.claude.com/docs/en/advisor). A managed list constrains `/model`,
316    /// `--model`, and the `model` key in a developer's own files; a model outside it can't be
317    /// selected. With the default prefix matching, this doesn't touch the Default option on its
318    /// own; pair it with
319    /// [`enforceAvailableModels`](https://code.claude.com/docs/en/settings-reference#enforceavailablemodels)
320    /// for that.
321    ///
322    /// - **Values**: array of model aliases or IDs
323    /// - **Default**: unset, so every model is available
324    /// - **Scope**: any settings file. Deploy it in managed settings to enforce it for an
325    ///   organization.
326    ///
327    /// Docs: [`availableModels`](https://code.claude.com/docs/en/settings-reference#availablemodels).
328    #[serde(skip_serializing_if = "Option::is_none")]
329    pub available_models: Option<Vec<String>>,
330    /// Map Anthropic model IDs to provider-specific model IDs, such as Amazon Bedrock inference
331    /// profile ARNs. Each model picker entry then uses its mapped value when calling the
332    /// provider API. Administrators use this on [Amazon Bedrock, Google Cloud's Agent Platform,
333    /// and Microsoft
334    /// Foundry](https://code.claude.com/docs/en/model-config#override-model-ids-per-version) to
335    /// route each model version to a specific inference profile, version name, or deployment
336    /// for governance, cost allocation, or regional routing.
337    ///
338    /// - **Values**: object mapping model ID to provider model ID
339    /// - **Default**: unset
340    /// - **Scope**: any settings file.
341    ///
342    /// Docs: [`modelOverrides`](https://code.claude.com/docs/en/settings-reference#modeloverrides).
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub model_overrides: Option<BTreeMap<String, String>>,
345    /// Set a default [effort
346    /// level](https://code.claude.com/docs/en/model-config#adjust-effort-level) for models you
347    /// haven't saved a level for. Lower levels are faster and cheaper on straightforward tasks,
348    /// and higher levels reason more deeply on complex problems. When you run `/effort low`,
349    /// `medium`, `high`, or `xhigh` in an interactive session on your machine, Claude Code
350    /// saves the level for the active model under
351    /// [`modelSettings`](https://code.claude.com/docs/en/settings-reference#modelsettings)
352    /// rather than writing this key.
353    ///
354    /// - **Values**: string, one of:
355    ///   - `"low"`: the least reasoning, for short, scoped, latency-sensitive tasks that aren't
356    ///     intelligence-sensitive
357    ///   - `"medium"`: reduces token usage for cost-sensitive work that can trade off some
358    ///     intelligence
359    ///   - `"high"`: balances token usage and intelligence
360    ///   - `"xhigh"`: deeper reasoning at higher token spend
361    /// - **Default**: unset
362    /// - **Scope**: any settings file.
363    ///
364    /// Docs: [`effortLevel`](https://code.claude.com/docs/en/settings-reference#effortlevel).
365    #[serde(skip_serializing_if = "Option::is_none")]
366    pub effort_level: Option<EffortLevel>,
367    /// Turn [fast mode](https://code.claude.com/docs/en/fast-mode) on for sessions where it's
368    /// available, for interactive work such as rapid iteration or live debugging where you want
369    /// speed at a higher cost per token. You don't usually edit this key yourself. Running
370    /// `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to
371    /// turn fast mode off removes the key.
372    ///
373    /// - **Values**: Boolean
374    ///   - `true`: Claude Code turns fast mode on for sessions where it's available. On Fable
375    ///     5.2, you must also [run `/fast` while using Fable
376    ///     5.2](https://code.claude.com/docs/en/fast-mode#switch-models-while-fast-mode-is-on)
377    ///   - `false`: fast mode stays off
378    /// - **Default**: unset, so fast mode is off
379    /// - **Scope**: any settings file.
380    ///
381    /// Docs: [`fastMode`](https://code.claude.com/docs/en/settings-reference#fastmode).
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub fast_mode: Option<bool>,
384    /// Normally, running `/fast` saves
385    /// [`fastMode`](https://code.claude.com/docs/en/settings-reference#fastmode) to a person's
386    /// user settings, so new sessions on a supported model start with fast mode on. On Fable
387    /// 5.2, that happens only if they [turned it on while using Fable
388    /// 5.2](https://code.claude.com/docs/en/fast-mode#switch-models-while-fast-mode-is-on). To
389    /// make each person run `/fast` in each session they want it, set this key to `true`.
390    ///
391    /// - **Values**: Boolean
392    ///   - `true`: a saved `fastMode: true` no longer turns fast mode on at session start, so
393    ///     each person runs `/fast` in each session they want it; a `fastMode: true` passed
394    ///     with `--settings` still counts for that session unless managed settings set this key
395    ///   - `false`: a saved `fastMode: true` works as
396    ///     [`fastMode`](https://code.claude.com/docs/en/settings-reference#fastmode) describes
397    /// - **Default**: `false`
398    /// - **Scope**: any settings file.
399    ///
400    /// Docs: [`fastModePerSessionOptIn`](https://code.claude.com/docs/en/settings-reference#fastmodepersessionoptin).
401    #[serde(skip_serializing_if = "Option::is_none")]
402    pub fast_mode_per_session_opt_in: Option<bool>,
403    /// Set the probability that the [session quality
404    /// survey](https://code.claude.com/docs/en/data-usage#session-quality-surveys) appears when
405    /// a session is eligible for it. Set `0` to keep the survey from appearing.
406    ///
407    /// - **Values**: number between `0` and `1`
408    /// - **Default**: unset, so Claude Code uses the rate Anthropic sets remotely, or its
409    ///   built-in rate of `0.005` on Amazon Bedrock, Google Cloud's Agent Platform, and
410    ///   Microsoft Foundry, which don't receive remote configuration
411    /// - **Scope**: any settings file.
412    ///
413    /// Docs: [`feedbackSurveyRate`](https://code.claude.com/docs/en/settings-reference#feedbacksurveyrate).
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub feedback_survey_rate: Option<f64>,
416    /// Approve every MCP server defined in project `.mcp.json` files without a prompt. Claude
417    /// Code writes this key to `.claude/settings.local.json` when you choose to approve all
418    /// servers in the approval dialog.
419    ///
420    /// - **Values**: Boolean
421    ///   - `true`: Claude Code approves every MCP server defined in project `.mcp.json` files
422    ///     without a prompt
423    ///   - `false`: Claude Code asks you to approve each server. In a trusted folder, a `false`
424    ///     in a higher-precedence file overrides a `true` in a lower one; in a folder you
425    ///     haven't trusted, a `true` in any honored file is enough
426    /// - **Default**: unset, so Claude Code asks you to approve each server
427    /// - **Scope**: any settings file. In a folder whose trust dialog you haven't accepted,
428    ///   Claude Code honors it from user settings, managed settings, and `--settings` and
429    ///   ignores it in the shared project file, both in the session and for `claude mcp list`
430    ///   and `claude mcp get`; [Project server approvals and workspace
431    ///   trust](https://code.claude.com/docs/en/mcp#project-server-approvals-and-workspace-trust)
432    ///   says when an untracked `.claude/settings.local.json` counts too.
433    ///
434    /// Docs: [`enableAllProjectMcpServers`](https://code.claude.com/docs/en/settings-reference#enableallprojectmcpservers).
435    #[serde(skip_serializing_if = "Option::is_none")]
436    pub enable_all_project_mcp_servers: Option<bool>,
437    /// Approve specific servers defined in project `.mcp.json` files so Claude Code connects
438    /// them without asking. Claude Code writes this key to `.claude/settings.local.json` when
439    /// you approve a server in the approval dialog.
440    ///
441    /// - **Values**: array of strings, the server names as they appear in `.mcp.json`
442    /// - **Default**: unset
443    /// - **Scope**: any settings file. In a folder whose trust dialog you haven't accepted,
444    ///   Claude Code honors it from user settings, managed settings, and `--settings` and
445    ///   ignores it in the shared project file, both in the session and for `claude mcp list`
446    ///   and `claude mcp get`; [Project server approvals and workspace
447    ///   trust](https://code.claude.com/docs/en/mcp#project-server-approvals-and-workspace-trust)
448    ///   says when an untracked `.claude/settings.local.json` counts too.
449    ///
450    /// Docs: [`enabledMcpjsonServers`](https://code.claude.com/docs/en/settings-reference#enabledmcpjsonservers).
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub enabled_mcpjson_servers: Option<Vec<String>>,
453    /// Reject specific servers defined in a project's `.mcp.json` file so Claude Code never
454    /// connects them or asks you to approve them. A rejection in any settings file applies,
455    /// including a project `.claude/settings.json` checked into the repository.
456    ///
457    /// - **Values**: array of strings, the server names as they appear in `.mcp.json`
458    /// - **Default**: unset
459    /// - **Scope**: any settings file.
460    ///
461    /// Docs: [`disabledMcpjsonServers`](https://code.claude.com/docs/en/settings-reference#disabledmcpjsonservers).
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub disabled_mcpjson_servers: Option<Vec<String>>,
464    /// Allowlist the MCP servers people can add. Claude Code blocks any server that doesn't
465    /// match an entry wherever it's defined, including plugin servers, servers a user passes
466    /// with `--mcp-config`, and servers from claude.ai. Built-in servers such as Claude in
467    /// Chrome, the `ide` server Claude Code connects to in a running [VS
468    /// Code](https://code.claude.com/docs/en/vs-code#the-built-in-ide-mcp-server) or
469    /// [JetBrains](https://code.claude.com/docs/en/jetbrains#the-built-in-ide-mcp-server) IDE,
470    /// and servers the CLI itself configures are exempt from the allowlist, and the denylist
471    /// still applies to them.
472    ///
473    /// - **Values**: array of objects, each with exactly one key. Use `serverName`, a string
474    ///   limited to letters, numbers, hyphens, and underscores; `serverCommand`, an array of
475    ///   the command and its arguments matched exactly; or `serverUrl`, a URL pattern with `*`
476    ///   wildcards
477    /// - **Default**: unset, so every server is allowed; an empty array blocks every server
478    ///   users add
479    /// - **Scope**: any settings file. Entries from every file merge into one allowlist unless
480    ///   allowmanagedmcpserversonly is set.
481    ///
482    /// Docs: [`allowedMcpServers`](https://code.claude.com/docs/en/settings-reference#allowedmcpservers).
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub allowed_mcp_servers: Option<Vec<McpServerRule>>,
485    /// Block specific MCP servers. Claude Code refuses to load a matching server wherever it's
486    /// defined, including plugin servers, servers passed with `--mcp-config`, servers from
487    /// `managed-mcp.json`, servers from
488    /// [`managedMcpServers`](https://code.claude.com/docs/en/settings-reference#managedmcpservers),
489    /// and the claude.ai connectors [it fetches
490    /// itself](https://code.claude.com/docs/en/mcp#how-connectors-reach-claude-code).
491    /// In-process `type: "sdk"` servers are exempt; the app that started the session registers
492    /// them.
493    ///
494    /// - **Values**: array of objects, each with exactly one key: `serverName`, a string, so a
495    ///   claude.ai connector's display name such as `"claude.ai Slack"` works; `serverCommand`,
496    ///   an array of the command and its arguments matched exactly; or `serverUrl`, a URL
497    ///   pattern with `*` wildcards
498    /// - **Default**: unset, so no server is blocked; an empty array also blocks nothing
499    /// - **Scope**: any settings file. Entries from every file merge into one denylist, and
500    ///   allowmanagedmcpserversonly doesn't change that.
501    ///
502    /// Docs: [`deniedMcpServers`](https://code.claude.com/docs/en/settings-reference#deniedmcpservers).
503    #[serde(skip_serializing_if = "Option::is_none")]
504    pub denied_mcp_servers: Option<Vec<McpServerRule>>,
505    /// An [HTTP hook](https://code.claude.com/docs/en/hooks#http-hook-fields) can put the value
506    /// of an environment variable into a request header, for example an `Authorization: Bearer
507    /// $HOOK_TOKEN` header, but only for variables the hook lists in its own `allowedEnvVars`.
508    /// This key sets an outer limit on that list for every HTTP hook: a hook can use a variable
509    /// only if both its own `allowedEnvVars` and this key name it. Use it to stop a hook from
510    /// reading a secret it shouldn't, even when the hook's definition asks for it.
511    ///
512    /// - **Values**: array of environment variable names
513    /// - **Default**: unset, so each hook's own `allowedEnvVars` list applies
514    /// - **Scope**: any settings file. Arrays merge across settings files.
515    ///
516    /// Docs: [`httpHookAllowedEnvVars`](https://code.claude.com/docs/en/settings-reference#httphookallowedenvvars).
517    #[serde(skip_serializing_if = "Option::is_none")]
518    pub http_hook_allowed_env_vars: Option<Vec<String>>,
519    /// Run your own commands, prompts, agents, HTTP requests, or MCP tools as
520    /// [hooks](https://code.claude.com/docs/en/hooks) at points in Claude Code's lifecycle,
521    /// such as before a tool call or when a session starts; the [hooks
522    /// reference](https://code.claude.com/docs/en/hooks#hook-events) lists every event, its
523    /// payload, and its exit codes. Each event maps to a list of matcher groups, and each group
524    /// lists the handlers to run when the matcher applies.
525    ///
526    /// - **Values**: object keyed by [hook
527    ///   event](https://code.claude.com/docs/en/hooks#hook-events); each value is an array of
528    ///   `{ "matcher", "hooks" }` groups whose `hooks` entries have a `type` of `"command"`,
529    ///   `"prompt"`, `"agent"`, `"http"`, or `"mcp_tool"`
530    /// - **Default**: unset, so no hooks run
531    /// - **Scope**: any settings file. Hooks merge across files rather than replacing each
532    ///   other, and hooks from managed settings can't be removed from other files.
533    ///
534    /// Docs: [`hooks`](https://code.claude.com/docs/en/settings-reference#hooks).
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub hooks: Option<Hooks>,
537    /// Turn off [hooks](https://code.claude.com/docs/en/hooks#disable-or-remove-hooks), any
538    /// custom [status line](https://code.claude.com/docs/en/statusline), and any custom [file
539    /// suggestion](https://code.claude.com/docs/en/settings-reference#filesuggestion) command.
540    /// Use it to turn all of these off temporarily without deleting them from your settings.
541    ///
542    /// - **Values**: Boolean
543    ///   - `true`: Claude Code turns off hooks, any custom status line, and any custom file
544    ///     suggestion command
545    ///   - `false`: hooks, the status line, and the file suggestion command run
546    /// - **Default**: unset, so hooks run
547    /// - **Scope**: any settings file. Only managed settings can disable managed hooks.
548    ///
549    /// Docs: [`disableAllHooks`](https://code.claude.com/docs/en/settings-reference#disableallhooks).
550    #[serde(skip_serializing_if = "Option::is_none")]
551    pub disable_all_hooks: Option<bool>,
552    /// Choose which [channel](https://code.claude.com/docs/en/channels) plugins can push
553    /// messages into sessions in your organization. When you set it, Claude Code uses your list
554    /// in place of the default Anthropic allowlist; each entry names a plugin and the
555    /// marketplace it comes from.
556    ///
557    /// - **Values**: array of objects, each with `marketplace` and `plugin` strings. An entry
558    ///   can instead be a `"plugin@marketplace"` string such as
559    ///   `"telegram@claude-plugins-official"`, which Claude Code treats as the equivalent
560    ///   object. The string form requires Claude Code v2.1.267 or later; earlier versions
561    ///   reject the whole `allowedChannelPlugins` value when it contains one
562    /// - **Default**: unset, so Claude Code uses the default Anthropic allowlist
563    /// - **Scope**: managed.
564    ///
565    /// Docs: [`allowedChannelPlugins`](https://code.claude.com/docs/en/settings-reference#allowedchannelplugins).
566    #[serde(skip_serializing_if = "Option::is_none")]
567    pub allowed_channel_plugins: Option<Vec<ChannelPluginEntry>>,
568    /// Limit which URLs [HTTP hooks](https://code.claude.com/docs/en/hooks#http-hook-fields)
569    /// can target. When you define this key, Claude Code runs an HTTP hook only if its URL
570    /// matches one of the patterns and blocks the rest without running them; an empty array
571    /// blocks every HTTP hook.
572    ///
573    /// - **Values**: array of URL patterns, with `*` as a wildcard
574    /// - **Default**: unset, so any URL is allowed
575    /// - **Scope**: any settings file. Arrays merge across settings files.
576    ///
577    /// Docs: [`allowedHttpHookUrls`](https://code.claude.com/docs/en/settings-reference#allowedhttphookurls).
578    #[serde(skip_serializing_if = "Option::is_none")]
579    pub allowed_http_hook_urls: Option<Vec<String>>,
580    /// Restrict hook execution to hooks your organization deploys.
581    ///
582    /// - **Values**: Boolean
583    ///   - `true`: only managed hooks run, plus Agent SDK hooks and hooks from plugins your
584    ///     managed settings force-enable. See [What runs under
585    ///     `allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#what-runs-under-allowmanagedhooksonly)
586    ///   - `false`: hooks from every settings scope and plugin run
587    /// - **Default**: unset, so hooks from every settings scope and plugin run
588    /// - **Scope**: managed.
589    ///
590    /// Docs: [`allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedhooksonly).
591    #[serde(skip_serializing_if = "Option::is_none")]
592    pub allow_managed_hooks_only: Option<bool>,
593    /// Make managed settings the only settings source of permission rules. Claude Code then
594    /// ignores `allow`, `ask`, and `deny` rules in user, project, local, and `--settings`
595    /// files, ignores `--allowedTools`, hides the always-allow choices in permission prompts,
596    /// and stops saving new rules. When [parent settings from an embedding
597    /// host](https://code.claude.com/docs/en/managed-settings#let-an-embedding-host-add-policy)
598    /// apply, Claude Code treats them as part of the managed tier.
599    ///
600    /// - **Values**: Boolean
601    ///   - `true`: managed settings become the only settings source of permission rules
602    ///   - `false`: Claude Code applies permission rules from user, project, local, and
603    ///     `--settings` files in addition to the managed ones
604    /// - **Default**: unset, so Claude Code applies permission rules from user, project, and
605    ///   local settings and from `--settings`, in addition to the managed ones
606    /// - **Scope**: managed.
607    ///
608    /// Docs: [`allowManagedPermissionRulesOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedpermissionrulesonly).
609    #[serde(skip_serializing_if = "Option::is_none")]
610    pub allow_managed_permission_rules_only: Option<bool>,
611    /// Run your own command to render a [status
612    /// line](https://code.claude.com/docs/en/statusline) below the prompt with context such as
613    /// the model, cost, or git branch. Optional fields adjust spacing, add periodic re-runs,
614    /// and hide the built-in vim mode indicator when your script renders `vim.mode` itself.
615    ///
616    /// - **Values**: object with `type` set to `"command"` and a `command` string, plus
617    ///   optional `padding` as a number of characters, `refreshInterval` as a number of
618    ///   seconds, minimum `1`, and `hideVimModeIndicator` as a Boolean
619    /// - **Default**: unset, so no status line
620    /// - **Scope**: any settings file. When allowmanagedhooksonly is on, or disableallhooks is
621    ///   set outside managed settings, only the managed settings value runs.
622    ///
623    /// Docs: [`statusLine`](https://code.claude.com/docs/en/settings-reference#statusline).
624    #[serde(skip_serializing_if = "Option::is_none")]
625    pub status_line: Option<StatusLine>,
626    /// Run your own command to supply `@` file path autocomplete instead of the built-in file
627    /// suggestion. The built-in suggestion uses fast filesystem traversal; a large monorepo may
628    /// do better with project-specific indexing such as a pre-built file index.
629    ///
630    /// - **Values**: object with `type`, always `"command"`, and `command`, the shell command
631    ///   to run
632    /// - **Default**: unset, so Claude Code uses the built-in file suggestion
633    /// - **Scope**: any settings file. Under the [status line and file suggestion
634    ///   gates](https://code.claude.com/docs/en/settings-reference#status-line-and-file-suggestion-gates),
635    ///   Claude Code turns the command off or runs only a managed value, and skips yours
636    ///   without warning.
637    ///
638    /// Docs: [`fileSuggestion`](https://code.claude.com/docs/en/settings-reference#filesuggestion).
639    #[serde(skip_serializing_if = "Option::is_none")]
640    pub file_suggestion: Option<CommandSetting>,
641    /// Turn individual [plugins](https://code.claude.com/docs/en/plugins/overview) on or off,
642    /// keyed by `plugin-name@marketplace-name`. A plugin with no entry at any scope falls back
643    /// to its
644    /// [`defaultEnabled`](https://code.claude.com/docs/en/plugins/manifest-reference#fields)
645    /// value. When you enable or disable a plugin with `/plugin` or `claude plugin enable`,
646    /// Claude Code writes this key for you.
647    ///
648    /// - **Values**: object mapping `plugin-name@marketplace-name` to a Boolean
649    /// - **Default**: unset, so each plugin follows its `defaultEnabled` value
650    /// - **Scope**: any settings file.
651    ///
652    /// Docs: [`enabledPlugins`](https://code.claude.com/docs/en/settings-reference#enabledplugins).
653    #[serde(skip_serializing_if = "Option::is_none")]
654    pub enabled_plugins: Option<BTreeMap<String, PluginEnabled>>,
655    /// Register additional plugin marketplaces by name, so that people who open the repository,
656    /// or everyone your managed settings reach, get the marketplace without adding it
657    /// themselves. Claude Code registers each marketplace it doesn't already know. Whether a
658    /// plugin that
659    /// [`enabledPlugins`](https://code.claude.com/docs/en/settings-reference#enabledplugins)
660    /// names from it installs depends on the plugin's source and which file enables it;
661    /// [Enabled in project settings but not
662    /// installed](https://code.claude.com/docs/en/plugins/loading#enabled-in-project-settings-but-not-installed)
663    /// has the rules.
664    ///
665    /// - **Values**: object mapping a marketplace name to an object with a `source` object and
666    ///   an optional `autoUpdate` Boolean
667    /// - **Default**: unset
668    /// - **Scope**: any settings file. Claude Code honors entries in a repository's
669    ///   `.claude/settings.json` or `.claude/settings.local.json` only after you accept the
670    ///   workspace trust dialog for that folder; in a folder you haven't trusted, including a
671    ///   `-p` run there, it ignores them without a message.
672    ///
673    /// Docs: [`extraKnownMarketplaces`](https://code.claude.com/docs/en/settings-reference#extraknownmarketplaces).
674    #[serde(skip_serializing_if = "Option::is_none")]
675    pub extra_known_marketplaces: Option<BTreeMap<String, Marketplace>>,
676    /// Restrict which plugin marketplace sources people in your organization can add and
677    /// install plugins from. Claude Code enforces the allowlist on marketplace add and on
678    /// plugin install, update, refresh, and auto-update, before any network or filesystem
679    /// operation, so a marketplace someone added before you set the policy can't be used to
680    /// fetch plugins once its source no longer matches. Blocked users see an error naming the
681    /// managed policy.
682    ///
683    /// - **Values**: array of marketplace source objects; see [Allowed source
684    ///   types](https://code.claude.com/docs/en/settings-reference#allowed-source-types)
685    /// - **Default**: unset, so users can add any marketplace. An empty array is a complete
686    ///   lockdown that blocks every marketplace source, including the official Anthropic
687    ///   marketplace
688    /// - **Scope**: managed.
689    ///
690    /// Docs: [`strictKnownMarketplaces`](https://code.claude.com/docs/en/settings-reference#strictknownmarketplaces).
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub strict_known_marketplaces: Option<Vec<Source>>,
693    /// List of marketplace names the user has chosen not to install when prompted.
694    ///
695    /// - **Values**: array of strings
696    /// - **Default**: unset
697    ///
698    /// Docs: not in the settings reference; listed in the
699    /// [JSON schema](https://json.schemastore.org/claude-code-settings.json).
700    #[serde(skip_serializing_if = "Option::is_none")]
701    pub skipped_marketplaces: Option<Vec<String>>,
702    /// List of plugin IDs (plugin@marketplace format) the user has chosen not to install when
703    /// prompted.
704    ///
705    /// - **Values**: array of strings
706    /// - **Default**: unset
707    ///
708    /// Docs: not in the settings reference; listed in the
709    /// [JSON schema](https://json.schemastore.org/claude-code-settings.json).
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub skipped_plugins: Option<Vec<String>>,
712    /// Restrict which kind of account people can log in with: `"claudeai"` for claude.ai
713    /// sign-in or `"console"` for Claude Console sign-in. Set `"gateway"` to send people to a
714    /// [cloud gateway](https://code.claude.com/docs/en/claude-apps-gateway) instead of a
715    /// first-party login. Administrators set it in managed settings and pair it with
716    /// [`forceLoginOrgUUID`](https://code.claude.com/docs/en/settings-reference#forceloginorguuid)
717    /// to keep developers' claude.ai logins inside one organization.
718    ///
719    /// - **Values**: string, one of:
720    ///   - `"claudeai"`: claude.ai sign-in
721    ///   - `"console"`: Claude Console sign-in
722    ///   - `"gateway"`: Claude Code sends people to a cloud gateway instead of a first-party
723    ///     login
724    /// - **Default**: unset, so people pick a login method
725    /// - **Scope**: any settings file. Claude Code honors `"gateway"` from the same sources as
726    ///   forcelogingatewayurl and treats it as unset everywhere else.
727    ///
728    /// Docs: [`forceLoginMethod`](https://code.claude.com/docs/en/settings-reference#forceloginmethod).
729    #[serde(skip_serializing_if = "Option::is_none")]
730    pub force_login_method: Option<LoginMethod>,
731    /// From a managed source, require claude.ai account logins to belong to one Anthropic
732    /// organization, given as a single UUID, or to any of several organizations, given as an
733    /// array. From any settings file, Claude Code also uses a single UUID to pre-select that
734    /// organization during a claude.ai or Claude Console login, and pre-selects nothing for an
735    /// array. If you set the key in any settings file, Claude Code also stops offering the
736    /// [keyless Console
737    /// sign-in](https://code.claude.com/docs/en/authentication#sign-in-without-an-api-key) in
738    /// the sessions that file applies to and creates an API key instead.
739    ///
740    /// - **Values**: string, one UUID, or array of strings, several UUIDs
741    /// - **Default**: unset, so any organization can log in
742    /// - **Scope**: any settings file. In a settings file that isn't a managed source, Claude
743    ///   Code doesn't check which organization a login belongs to, and a single UUID
744    ///   pre-selects the organization during login.
745    ///
746    /// Docs: [`forceLoginOrgUUID`](https://code.claude.com/docs/en/settings-reference#forceloginorguuid).
747    #[serde(skip_serializing_if = "Option::is_none", rename = "forceLoginOrgUUID")]
748    pub force_login_org_uuid: Option<OneOrMany>,
749    /// Run your own command to generate the headers Claude Code sends with OpenTelemetry
750    /// exports, for backends whose tokens rotate. Claude Code runs it at startup and
751    /// periodically after that, and expects a JSON object of string header values on stdout.
752    ///
753    /// - **Values**: string, an executable path or a shell command line
754    /// - **Default**: unset, so Claude Code adds no helper-generated headers
755    /// - **Scope**: any settings file.
756    ///
757    /// Docs: [`otelHeadersHelper`](https://code.claude.com/docs/en/settings-reference#otelheadershelper).
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub otel_headers_helper: Option<String>,
760    /// Select an [output style](https://code.claude.com/docs/en/output-styles) by name. An
761    /// output style is a saved set of instructions that changes Claude's role, tone, and output
762    /// format, such as the built-in Explanatory and Learning styles or one you wrote yourself.
763    /// If you change this key during a session, Claude uses the new style starting with your
764    /// next message.
765    ///
766    /// - **Values**: string, the name of a
767    ///   [built-in](https://code.claude.com/docs/en/output-styles#built-in-output-styles) or
768    ///   [custom](https://code.claude.com/docs/en/output-styles#create-a-custom-output-style)
769    ///   output style
770    /// - **Default**: unset, so Claude Code uses the default style
771    /// - **Scope**: any settings file.
772    ///
773    /// Docs: [`outputStyle`](https://code.claude.com/docs/en/settings-reference#outputstyle).
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub output_style: Option<String>,
776    /// Skip the [WebFetch domain safety
777    /// check](https://code.claude.com/docs/en/data-usage#webfetch-domain-safety-check), which
778    /// sends each requested hostname to `api.anthropic.com` before fetching. Set `true` in
779    /// environments that block traffic to Anthropic, such as Amazon Bedrock, Google Cloud's
780    /// Agent Platform, or Microsoft Foundry deployments with restrictive egress.
781    ///
782    /// - **Values**: Boolean
783    ///   - `true`: Claude Code skips the WebFetch domain safety check
784    ///   - `false`: the check runs before the first fetch to each hostname in a session, and
785    ///     again for a hostname whose earlier check was blocked or failed
786    /// - **Default**: unset, so the check runs before the first fetch to each hostname in a
787    ///   session
788    /// - **Scope**: any settings file.
789    ///
790    /// Docs: [`skipWebFetchPreflight`](https://code.claude.com/docs/en/settings-reference#skipwebfetchpreflight).
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub skip_web_fetch_preflight: Option<bool>,
793    /// Isolate the Bash commands Claude runs from your filesystem and network with
794    /// [sandboxing](https://code.claude.com/docs/en/sandboxing). Turn the sandbox on with
795    /// `enabled`, then narrow or widen what sandboxed commands can touch with the `filesystem`,
796    /// `network`, and `credentials` sub-objects. The sandbox runs on macOS, Linux, and WSL2.
797    ///
798    /// - **Values**: object with `enabled`, `failIfUnavailable`, `autoAllowBashIfSandboxed`,
799    ///   `excludedCommands`, `allowUnsandboxedCommands`, `enableWeakerNestedSandbox`,
800    ///   `enableWeakerNetworkIsolation`, `allowAppleEvents`, `allowNestedUserNamespaces`,
801    ///   `bwrapPath`, `socatPath`, `ignoreViolations`, and `ripgrep`, plus the `filesystem`,
802    ///   `network`, and `credentials` objects
803    /// - **Default**: unset, so Claude Code runs commands without a sandbox
804    /// - **Scope**: any settings file.
805    ///
806    /// Docs: [`sandbox`](https://code.claude.com/docs/en/settings-reference#sandbox).
807    #[serde(skip_serializing_if = "Option::is_none")]
808    pub sandbox: Option<Sandbox>,
809    /// While a turn is in progress, the spinner shows a rotating verb such as "Accomplishing",
810    /// "Architecting", or "Baking". Use this key to add your own verbs to that rotation or
811    /// replace the built-in list with yours.
812    ///
813    /// - **Values**: object with a `verbs` array of strings and `mode`, one of:
814    ///   - `"append"`: Claude Code adds your verbs to the built-in set
815    ///   - `"replace"`: Claude Code shows only your verbs
816    /// - **Default**: unset, so Claude Code uses the built-in verbs
817    /// - **Scope**: any settings file.
818    ///
819    /// Docs: [`spinnerVerbs`](https://code.claude.com/docs/en/settings-reference#spinnerverbs).
820    #[serde(skip_serializing_if = "Option::is_none")]
821    pub spinner_verbs: Option<SpinnerVerbs>,
822    /// While Claude works, the spinner line rotates through short tips about Claude Code
823    /// features, such as "Use Plan Mode to prepare for a complex request before making changes.
824    /// Press Shift+Tab twice to enable." Set this key to `false` to hide them. Appears in
825    /// `/config` as **Show tips**.
826    ///
827    /// - **Values**: Boolean
828    ///   - `true`: you see tips in the spinner while Claude is working
829    ///   - `false`: Claude Code hides spinner tips
830    /// - **Default**: `true`
831    /// - **Scope**: any settings file.
832    ///
833    /// Docs: [`spinnerTipsEnabled`](https://code.claude.com/docs/en/settings-reference#spinnertipsenabled).
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub spinner_tips_enabled: Option<bool>,
836    /// Add your own tips to the [spinner
837    /// tips](https://code.claude.com/docs/en/settings-reference#spinnertipsenabled) that Claude
838    /// Code shows while Claude works, or replace the built-in tips with yours. Claude Code puts
839    /// your tips in the same rotation as the built-in ones. If you set
840    /// [`spinnerTipsEnabled`](https://code.claude.com/docs/en/settings-reference#spinnertipsenabled)
841    /// to `false`, Claude Code hides all tips, yours included.
842    ///
843    /// - **Values**: object with `tips`, `tipsFile`, `label`, and `excludeDefault` fields, each
844    ///   optional
845    /// - **Default**: unset, so Claude Code shows only the built-in tips
846    /// - **Scope**: any settings file. Claude Code honors tip objects, `tipsFile`, `label`, and
847    ///   `excludeDefault` from user settings, the `--settings` flag, and managed settings; from
848    ///   project and local settings it reads plain string tips only.
849    ///
850    /// Docs: [`spinnerTipsOverride`](https://code.claude.com/docs/en/settings-reference#spinnertipsoverride).
851    #[serde(skip_serializing_if = "Option::is_none")]
852    pub spinner_tips_override: Option<SpinnerTips>,
853    /// Some terminals can show a progress indicator on the tab or in the taskbar for the
854    /// program running in them. While Claude is working, Claude Code reports an in-progress
855    /// state to the terminal, so you can see from another tab or window whether the session is
856    /// still busy. The indicator stays visible after the turn ends while [background
857    /// subagents](https://code.claude.com/docs/en/sub-agents#run-subagents-in-foreground-or-background)
858    /// or [dynamic workflows](https://code.claude.com/docs/en/workflows) are still running, and
859    /// clears once the session is idle.
860    ///
861    /// - **Values**: Boolean
862    ///   - `true`: you see the terminal progress bar in terminals that support it
863    ///   - `false`: Claude Code hides the terminal progress bar
864    /// - **Default**: `true`
865    /// - **Scope**: any settings file. A value in `~/.claude.json` from an older version
866    ///   applies when no settings file sets it.
867    ///
868    /// Docs: [`terminalProgressBarEnabled`](https://code.claude.com/docs/en/settings-reference#terminalprogressbarenabled).
869    #[serde(skip_serializing_if = "Option::is_none")]
870    pub terminal_progress_bar_enabled: Option<bool>,
871    /// Show or hide the turn duration message after each response, such as "Cooked for 1m 6s ·
872    /// done 6:05 PM". The clock after "done" shows when the turn finished;
873    /// [`timeFormat`](https://code.claude.com/docs/en/settings-reference#timeformat) and
874    /// [`timeZone`](https://code.claude.com/docs/en/settings-reference#timezone) control its
875    /// format and zone. Appears in `/config` as **Show turn duration**.
876    ///
877    /// - **Values**: Boolean
878    ///   - `true`: you see the turn duration message after each response
879    ///   - `false`: Claude Code hides the turn duration message
880    /// - **Default**: `true`
881    /// - **Scope**: any settings file. A value in `~/.claude.json` from an older version
882    ///   applies when no settings file sets it.
883    ///
884    /// Docs: [`showTurnDuration`](https://code.claude.com/docs/en/settings-reference#showturnduration).
885    #[serde(skip_serializing_if = "Option::is_none")]
886    pub show_turn_duration: Option<bool>,
887    /// Hide or collapse a
888    /// [skill](https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings)
889    /// without editing its `SKILL.md`. Claude Code applies the value under each skill's name to
890    /// the skill list Claude sees and to your `/` autocomplete.
891    ///
892    /// - **Values**: object mapping skill name to one of:
893    ///   - `"on"`: Claude sees the skill and you can type `/name`
894    ///   - `"name-only"`: Claude sees the skill by name without its description
895    ///   - `"user-invocable-only"`: Claude doesn't see the skill, but you can still type
896    ///     `/name`
897    ///   - `"off"`: Claude doesn't see the skill and `/name` is hidden from autocomplete
898    /// - **Default**: unset, so every skill is `"on"`
899    /// - **Scope**: any settings file. The `/skills` menu writes to
900    ///   `.claude/settings.local.json`.
901    ///
902    /// Docs: [`skillOverrides`](https://code.claude.com/docs/en/settings-reference#skilloverrides).
903    #[serde(skip_serializing_if = "Option::is_none")]
904    pub skill_overrides: Option<BTreeMap<String, SkillOverride>>,
905    /// Reduce or turn off interface animations such as the spinner, shimmer, and flash effects.
906    /// Appears in `/config` as **Reduce motion**.
907    ///
908    /// - **Values**: Boolean
909    ///   - `true`: Claude Code reduces or turns off interface animations such as the spinner,
910    ///     shimmer, and flash effects
911    ///   - `false`: the same as unset; Claude Code shows its animations
912    /// - **Default**: `false`
913    /// - **Scope**: any settings file.
914    ///
915    /// Docs: [`prefersReducedMotion`](https://code.claude.com/docs/en/settings-reference#prefersreducedmotion).
916    #[serde(skip_serializing_if = "Option::is_none")]
917    pub prefers_reduced_motion: Option<bool>,
918    /// Point the PR links Claude Code renders, in the footer badge and in tool-result
919    /// summaries, at an internal code-review tool instead of `github.com`. Claude Code
920    /// substitutes `{host}`, `{owner}`, `{repo}`, `{number}`, and `{url}` from the PR URL.
921    /// [GitLab merge
922    /// request](https://code.claude.com/docs/en/interactive-mode#gitlab-merge-requests) links
923    /// on both surfaces keep their GitLab URL.
924    ///
925    /// - **Values**: string, a URL template using any of the five placeholders
926    /// - **Default**: unset
927    /// - **Scope**: any settings file.
928    ///
929    /// Docs: [`prUrlTemplate`](https://code.claude.com/docs/en/settings-reference#prurltemplate).
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub pr_url_template: Option<String>,
932    /// Turn [extended thinking](https://code.claude.com/docs/en/model-config#extended-thinking)
933    /// off for every session by setting this to `false`. Thinking is on by default, so `true`
934    /// changes nothing. Most people set this through `/config` rather than by editing the file.
935    ///
936    /// - **Values**: Boolean
937    ///   - `true`: no effect; thinking is already on
938    ///   - `false`: Claude Code turns extended thinking off for every session
939    /// - **Default**: unset, so thinking is on for models that support it
940    /// - **Scope**: any settings file.
941    ///
942    /// Docs: [`alwaysThinkingEnabled`](https://code.claude.com/docs/en/settings-reference#alwaysthinkingenabled).
943    #[serde(skip_serializing_if = "Option::is_none")]
944    pub always_thinking_enabled: Option<bool>,
945    /// Show your organization's announcements to users at startup. When you list more than one,
946    /// Claude Code picks one at random for each session; on a person's very first launch it
947    /// shows the first entry.
948    ///
949    /// - **Values**: array of strings
950    /// - **Default**: unset, so no announcement shows
951    /// - **Scope**: any settings file.
952    ///
953    /// Docs: [`companyAnnouncements`](https://code.claude.com/docs/en/settings-reference#companyannouncements).
954    #[serde(skip_serializing_if = "Option::is_none")]
955    pub company_announcements: Option<Vec<String>>,
956    /// Choose where Claude Code shows [agent team](https://code.claude.com/docs/en/agent-teams)
957    /// teammates: inside your main terminal pane, or in split panes when your terminal supports
958    /// them. See [Choose a display
959    /// mode](https://code.claude.com/docs/en/agent-teams#choose-a-display-mode).
960    ///
961    /// - **Values**: string, one of:
962    ///   - `"in-process"`: teammates run inside your main terminal pane
963    ///   - `"auto"`: split panes when you're running inside tmux, or inside iTerm2 with `it2`
964    ///     on your `PATH` or tmux installed; in-process otherwise
965    ///   - `"tmux"`: split panes using tmux or iTerm2, detected from your terminal
966    ///   - `"iterm2"`: iTerm2 native split panes through the `it2` CLI
967    /// - **Default**: `"in-process"`
968    /// - **Scope**: any settings file. Claude Code also reads a value left in `~/.claude.json`
969    ///   by older versions.
970    ///
971    /// Docs: [`teammateMode`](https://code.claude.com/docs/en/settings-reference#teammatemode).
972    #[serde(skip_serializing_if = "Option::is_none")]
973    pub teammate_mode: Option<TeammateMode>,
974    /// Configure how Claude Code creates and manages [git
975    /// worktrees](https://code.claude.com/docs/en/worktrees) for `--worktree`, the
976    /// `EnterWorktree` tool, and isolated subagents and background sessions.
977    ///
978    /// - **Values**: object with `baseRef`, `symlinkDirectories`, `sparsePaths`, and
979    ///   `bgIsolation`
980    /// - **Default**: unset
981    /// - **Scope**: any settings file.
982    ///
983    /// Docs: [`worktree`](https://code.claude.com/docs/en/settings-reference#worktree).
984    #[serde(skip_serializing_if = "Option::is_none")]
985    pub worktree: Option<Worktree>,
986    /// Choose whether Claude Code applies managed settings supplied by an embedding host
987    /// process, such as the Agent SDK or an IDE extension, when an admin-deployed managed tier
988    /// is also present. With `"first-wins"`, Claude Code drops the host-supplied settings; with
989    /// `"merge"`, it applies them under the admin tier through a restrictive-only filter. Set
990    /// `"merge"` when a host needs to pass its own restrictions to the sessions it launches,
991    /// for example Claude Desktop delivering a gateway's egress allowlist.
992    ///
993    /// - **Values**: string, one of:
994    ///   - `"first-wins"`: Claude Code drops the host-supplied settings when an admin-deployed
995    ///     managed tier is present
996    ///   - `"merge"`: Claude Code applies the host-supplied settings under the admin tier
997    ///     through a restrictive-only filter
998    /// - **Default**: `"first-wins"`
999    /// - **Scope**: managed. Claude Code reads it from the highest-priority admin-controlled
1000    ///   managed source.
1001    ///
1002    /// Docs: [`parentSettingsBehavior`](https://code.claude.com/docs/en/settings-reference#parentsettingsbehavior).
1003    #[serde(skip_serializing_if = "Option::is_none")]
1004    pub parent_settings_behavior: Option<SourcesBehavior>,
1005    /// Add your organization's own text to the plugin trust warning Claude Code shows before
1006    /// installation, for example to confirm that plugins from your internal marketplace are
1007    /// vetted.
1008    ///
1009    /// - **Values**: string
1010    /// - **Default**: unset, so Claude Code shows the standard warning alone
1011    /// - **Scope**: managed.
1012    ///
1013    /// Docs: [`pluginTrustMessage`](https://code.claude.com/docs/en/settings-reference#plugintrustmessage).
1014    #[serde(skip_serializing_if = "Option::is_none")]
1015    pub plugin_trust_message: Option<String>,
1016    /// Store the non-sensitive answers you give a plugin's
1017    /// [`userConfig`](https://code.claude.com/docs/en/plugins/manifest-reference#user-configuration)
1018    /// configuration dialog, keyed by plugin ID. Claude Code writes this key to your user
1019    /// settings when you fill in the dialog, so you don't need to edit it by hand. Claude Code
1020    /// stores sensitive options in the macOS Keychain instead, falling back to
1021    /// `~/.claude/.credentials.json` when the Keychain rejects the write; on platforms without
1022    /// a supported keychain, it stores them in `~/.claude/.credentials.json`.
1023    ///
1024    /// - **Values**: object mapping a plugin ID to an object with an `options` field, mapping
1025    ///   each option name to a string, number, Boolean, or array of strings, and an optional
1026    ///   `mcpServers` field holding per-server user configuration values in the same shape
1027    /// - **Default**: unset
1028    /// - **Scope**: user or managed.
1029    ///
1030    /// Docs: [`pluginConfigs`](https://code.claude.com/docs/en/settings-reference#pluginconfigs).
1031    #[serde(skip_serializing_if = "Option::is_none")]
1032    pub plugin_configs: Option<BTreeMap<String, PluginConfig>>,
1033    /// Make the managed allowlist the only one that applies. Claude Code then reads
1034    /// [`allowedMcpServers`](https://code.claude.com/docs/en/settings-reference#allowedmcpservers)
1035    /// from managed settings alone and ignores allowlists in user, project, and local settings;
1036    /// [`deniedMcpServers`](https://code.claude.com/docs/en/settings-reference#deniedmcpservers)
1037    /// still merges from every settings scope, so users can still block servers for themselves.
1038    /// Administrators set it so a user's own settings can't broaden what the managed allowlist
1039    /// permits.
1040    ///
1041    /// - **Values**: Boolean
1042    ///   - `true`: Claude Code reads `allowedMcpServers` from managed settings alone and
1043    ///     ignores allowlists in user, project, and local settings
1044    ///   - `false`: allowlists from every settings scope merge
1045    /// - **Default**: `false`, so allowlists from every settings scope merge
1046    /// - **Scope**: managed.
1047    ///
1048    /// Docs: [`allowManagedMcpServersOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedmcpserversonly).
1049    #[serde(skip_serializing_if = "Option::is_none")]
1050    pub allow_managed_mcp_servers_only: Option<bool>,
1051    /// Block plugin marketplace sources for your organization. Claude Code checks the blocklist
1052    /// on marketplace add and on plugin install, update, refresh, and auto-update, so a
1053    /// marketplace someone added before you set the policy can't be used to fetch plugins
1054    /// either. Blocked sources are checked before download, so they never touch the filesystem.
1055    ///
1056    /// - **Values**: array of marketplace source objects, in the same forms as
1057    ///   [`strictKnownMarketplaces`](https://code.claude.com/docs/en/settings-reference#allowed-source-types)
1058    /// - **Default**: unset, so no marketplace is blocked
1059    /// - **Scope**: managed.
1060    ///
1061    /// Docs: [`blockedMarketplaces`](https://code.claude.com/docs/en/settings-reference#blockedmarketplaces).
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    pub blocked_marketplaces: Option<Vec<Source>>,
1064    /// Run the main thread as a named
1065    /// [subagent](https://code.claude.com/docs/en/sub-agents#invoke-subagents-explicitly), so
1066    /// Claude Code applies that subagent's system prompt, tool restrictions, and model to your
1067    /// session. The same key sets the default agent for sessions you dispatch from `claude
1068    /// agents`.
1069    ///
1070    /// - **Values**: string, the name of a built-in or custom agent
1071    /// - **Default**: unset
1072    /// - **Scope**: any settings file.
1073    ///
1074    /// Docs: [`agent`](https://code.claude.com/docs/en/settings-reference#agent).
1075    #[serde(skip_serializing_if = "Option::is_none")]
1076    pub agent: Option<String>,
1077    /// Store [auto memory](https://code.claude.com/docs/en/memory#storage-location) in a
1078    /// directory of your choice instead of the per-project default.
1079    ///
1080    /// - **Values**: string, an absolute or `~/`-prefixed directory path
1081    /// - **Default**: unset, so Claude Code uses `~/.claude/projects/<project>/memory/`
1082    /// - **Scope**: any settings file.
1083    ///
1084    /// Docs: [`autoMemoryDirectory`](https://code.claude.com/docs/en/settings-reference#automemorydirectory).
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    pub auto_memory_directory: Option<String>,
1087    /// Add your own rules to what the [auto
1088    /// mode](https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode)
1089    /// classifier blocks and allows. Use it to tell the classifier which repos, buckets, and
1090    /// domains your organization trusts, so it stops blocking routine internal operations. The
1091    /// classifier ships with [built-in allow and deny
1092    /// rules](https://code.claude.com/docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config).
1093    ///
1094    /// - **Values**: object with `environment`, `allow`, `soft_deny`, and `hard_deny` arrays of
1095    ///   prose rules, plus the
1096    ///   [`classifyAllShell`](https://code.claude.com/docs/en/settings-reference#automode-classifyallshell)
1097    ///   Boolean
1098    /// - **Default**: unset, so the classifier uses only its [built-in
1099    ///   rules](https://code.claude.com/docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config)
1100    /// - **Scope**: user or managed.
1101    ///
1102    /// Docs: [`autoMode`](https://code.claude.com/docs/en/settings-reference#automode).
1103    #[serde(skip_serializing_if = "Option::is_none")]
1104    pub auto_mode: Option<AutoMode>,
1105    /// Allow [channels](https://code.claude.com/docs/en/channels) for your organization. On
1106    /// claude.ai Team and Enterprise plans, Claude Code blocks channels until you set this to
1107    /// `true`. For [Anthropic
1108    /// Console](https://code.claude.com/docs/en/authentication#claude-console-authentication)
1109    /// accounts that authenticate with an API key, channels are allowed by default.
1110    ///
1111    /// - **Values**: Boolean
1112    ///   - `true`: Claude Code allows channels for your organization
1113    ///   - `false`: the same as unset; whether channels are blocked depends on your plan, as
1114    ///     the Default says
1115    /// - **Default**: unset; channels are blocked on Team and Enterprise plans and on Console
1116    ///   accounts with managed settings, and allowed on Pro, Max, and Ultra plans and on
1117    ///   Console accounts without managed settings
1118    /// - **Scope**: managed.
1119    ///
1120    /// Docs: [`channelsEnabled`](https://code.claude.com/docs/en/settings-reference#channelsenabled).
1121    #[serde(skip_serializing_if = "Option::is_none")]
1122    pub channels_enabled: Option<bool>,
1123    /// Choose whether Bash or PowerShell runs the shell commands you type with the [`!`
1124    /// prefix](https://code.claude.com/docs/en/interactive-mode#shell-mode-with-prefix) in the
1125    /// input box, the ones Claude Code runs directly and adds to the session. `"powershell"`
1126    /// works only while the [PowerShell
1127    /// tool](https://code.claude.com/docs/en/tools-reference#powershell-tool) is on. The tool
1128    /// is on by default on Windows without Git Bash, and on Windows with Git Bash for claude.ai
1129    /// and Console accounts.
1130    ///
1131    /// - **Values**: string, one of:
1132    ///   - `"bash"`: Claude Code runs your `!` commands in Bash
1133    ///   - `"powershell"`: Claude Code runs your `!` commands in PowerShell
1134    /// - **Default**: `"bash"`, or `"powershell"` on Windows when Bash isn't available
1135    /// - **Scope**: any settings file.
1136    ///
1137    /// Docs: [`defaultShell`](https://code.claude.com/docs/en/settings-reference#defaultshell).
1138    #[serde(skip_serializing_if = "Option::is_none")]
1139    pub default_shell: Option<Shell>,
1140    /// Stop Claude Code from registering the `claude-cli://` protocol handler with the
1141    /// operating system. [Deep links](https://code.claude.com/docs/en/deep-links) let external
1142    /// tools open a Claude Code session with a pre-filled prompt. Set this in environments
1143    /// where protocol handler registration is restricted or managed separately.
1144    ///
1145    /// - **Values**: the string `"disable"`
1146    /// - **Default**: unset, so Claude Code registers the handler
1147    /// - **Scope**: any settings file.
1148    ///
1149    /// Docs: [`disableDeepLinkRegistration`](https://code.claude.com/docs/en/settings-reference#disabledeeplinkregistration).
1150    #[serde(skip_serializing_if = "Option::is_none")]
1151    pub disable_deep_link_registration: Option<DisableFlag>,
1152    /// Turn off inline shell execution for `` !`...` `` and ` ```! ` blocks in
1153    /// [skills](https://code.claude.com/docs/en/skills) and custom commands from user, project,
1154    /// plugin, or additional-directory sources. Claude Code replaces each command with `[shell
1155    /// command execution disabled by policy]` instead of running it.
1156    ///
1157    /// - **Values**: Boolean
1158    ///   - `true`: Claude Code replaces each inline shell command with `[shell command
1159    ///     execution disabled by policy]` instead of running it
1160    ///   - `false`: inline shell runs
1161    /// - **Default**: unset, so inline shell runs
1162    /// - **Scope**: any settings file. A `true` in managed settings can't be overridden by
1163    ///   `false` elsewhere.
1164    ///
1165    /// Docs: [`disableSkillShellExecution`](https://code.claude.com/docs/en/settings-reference#disableskillshellexecution).
1166    #[serde(skip_serializing_if = "Option::is_none")]
1167    pub disable_skill_shell_execution: Option<bool>,
1168    /// Block CLI startup until Claude Code has freshly fetched [server-managed
1169    /// settings](https://code.claude.com/docs/en/server-managed-settings). If the fetch fails,
1170    /// Claude Code exits instead of continuing with cached or no settings. Set it when your
1171    /// environment can't accept even a brief window in which a session runs without its managed
1172    /// policy.
1173    ///
1174    /// - **Values**: Boolean
1175    ///   - `true`: Claude Code blocks startup until it has freshly fetched server-managed
1176    ///     settings, and exits if the fetch fails
1177    ///   - `false`: unless Anthropic requires the settings, Claude Code doesn't block startup
1178    ///     on the fetch, though at a sign-in startup it waits up to five seconds for the fetch
1179    /// - **Default**: `false`
1180    /// - **Scope**: managed. Claude Code honors a `true` from any admin-controlled managed
1181    ///   source, even one that isn't the highest-priority source.
1182    ///
1183    /// Docs: [`forceRemoteSettingsRefresh`](https://code.claude.com/docs/en/settings-reference#forceremotesettingsrefresh).
1184    #[serde(skip_serializing_if = "Option::is_none")]
1185    pub force_remote_settings_refresh: Option<bool>,
1186    /// Keep background auto-updates and `claude update` from installing any version below this
1187    /// one, so moving to the `"stable"` channel doesn't downgrade you from a newer `"latest"`
1188    /// build. Claude Code writes this key for you when you choose to stay on your current
1189    /// version while switching channels in `/config`, and clears it when you switch back to
1190    /// `"latest"`.
1191    ///
1192    /// - **Values**: string, a version number such as `"2.1.100"`; a value that isn't a valid
1193    ///   version is ignored
1194    /// - **Default**: unset, so updates can install any version the channel offers
1195    /// - **Scope**: any settings file. Set it in managed settings to pin an organization-wide
1196    ///   minimum that user and project settings can't lower.
1197    ///
1198    /// Docs: [`minimumVersion`](https://code.claude.com/docs/en/settings-reference#minimumversion).
1199    #[serde(skip_serializing_if = "Option::is_none")]
1200    pub minimum_version: Option<String>,
1201    /// When Claude finishes a plan in [plan
1202    /// mode](https://code.claude.com/docs/en/permission-modes#review-and-approve-a-plan), it
1203    /// shows an approval menu. Planning can use a lot of context, so this key adds a first
1204    /// option to that menu, **Yes, clear context and …**, that approves the plan, clears the
1205    /// conversation context, and starts implementing from the plan alone. The rest of the label
1206    /// names the permission mode the session continues in, and shows how much of your context
1207    /// the planning used.
1208    ///
1209    /// - **Values**: Boolean
1210    ///   - `true`: the plan approval menu gets a first option, **Yes, clear context and …**,
1211    ///     that approves the plan and clears the conversation context
1212    ///   - `false`: the plan approval menu shows no clear-context option
1213    /// - **Default**: `false`
1214    /// - **Scope**: any settings file.
1215    ///
1216    /// Docs: [`showClearContextOnPlanAccept`](https://code.claude.com/docs/en/settings-reference#showclearcontextonplanaccept).
1217    #[serde(skip_serializing_if = "Option::is_none")]
1218    pub show_clear_context_on_plan_accept: Option<bool>,
1219    /// See summaries of Claude's [extended
1220    /// thinking](https://code.claude.com/docs/en/model-config#extended-thinking) in interactive
1221    /// sessions. Set it if you want the full summaries when you expand thinking with `Ctrl+O`.
1222    /// When unset or `false`, the Anthropic API redacts thinking blocks and Claude Code shows a
1223    /// collapsed stub.
1224    ///
1225    /// - **Values**: Boolean
1226    ///   - `true`: you see full thinking summaries when you expand thinking with `Ctrl+O`
1227    ///   - `false`: the Anthropic API redacts thinking blocks and Claude Code shows a collapsed
1228    ///     stub
1229    /// - **Default**: `false`
1230    /// - **Scope**: any settings file.
1231    ///
1232    /// Docs: [`showThinkingSummaries`](https://code.claude.com/docs/en/settings-reference#showthinkingsummaries).
1233    #[serde(skip_serializing_if = "Option::is_none")]
1234    pub show_thinking_summaries: Option<bool>,
1235    /// Skip the confirmation dialog Claude Code shows before a session enters
1236    /// `bypassPermissions` mode, whether from `--dangerously-skip-permissions` or from
1237    /// `defaultMode: "bypassPermissions"`. Claude Code writes `true` here in your user settings
1238    /// when you accept that dialog once.
1239    ///
1240    /// - **Values**: Boolean
1241    ///   - `true`: Claude Code skips the confirmation dialog before a session enters
1242    ///     `bypassPermissions` mode
1243    ///   - `false`: the same as unset; the dialog appears unless another of these files sets
1244    ///     `true`
1245    /// - **Default**: unset, so the dialog appears
1246    /// - **Scope**: user, local, or managed, and files passed with `--settings`. [Background
1247    ///   sessions](https://code.claude.com/docs/en/permission-modes#bypass-permissions-ignored-in-a-background-session)
1248    ///   count only user and managed settings.
1249    ///
1250    /// Docs: [`skipDangerousModePermissionPrompt`](https://code.claude.com/docs/en/settings-reference#skipdangerousmodepermissionprompt).
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    pub skip_dangerous_mode_permission_prompt: Option<bool>,
1253    /// Block skills, agents, hooks, and MCP servers from user and project sources. Combine it
1254    /// with
1255    /// [`strictKnownMarketplaces`](https://code.claude.com/docs/en/settings-reference#strictknownmarketplaces)
1256    /// to choose which marketplaces users can install plugins from. Add
1257    /// [`disableSideloadFlags`](https://code.claude.com/docs/en/settings-reference#disablesideloadflags)
1258    /// to reject the CLI flags that sideload plugins, agents, and MCP servers for a single run.
1259    ///
1260    /// - **Values**: `true` to lock all of them, or an array naming the ones to lock, from
1261    ///   `"skills"`, `"agents"`, `"hooks"`, and `"mcp"`
1262    /// - **Default**: unset, so nothing is locked
1263    /// - **Scope**: managed.
1264    ///
1265    /// Docs: [`strictPluginOnlyCustomization`](https://code.claude.com/docs/en/settings-reference#strictpluginonlycustomization).
1266    #[serde(skip_serializing_if = "Option::is_none")]
1267    pub strict_plugin_only_customization: Option<StrictCustomization>,
1268    /// Choose the terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen
1269    /// renderer](https://code.claude.com/docs/en/fullscreen) with virtualized scrollback, or
1270    /// `"default"` for the classic main-screen renderer. Running `/tui fullscreen` or `/tui
1271    /// default` writes this key for you.
1272    ///
1273    /// - **Values**: string, one of:
1274    ///   - `"default"`: the classic main-screen renderer
1275    ///   - `"fullscreen"`: the flicker-free alt-screen renderer with virtualized scrollback
1276    /// - **Default**: unset, so Claude Code [picks the renderer for
1277    ///   you](https://code.claude.com/docs/en/fullscreen#fullscreen-by-default)
1278    /// - **Scope**: any settings file.
1279    ///
1280    /// Docs: [`tui`](https://code.claude.com/docs/en/settings-reference#tui).
1281    #[serde(skip_serializing_if = "Option::is_none")]
1282    pub tui: Option<Tui>,
1283    /// Set the transcript view Claude Code starts in: `"default"`, `"verbose"`, or `"focus"`.
1284    /// When set, it overrides both the sticky `/focus` selection and the
1285    /// [`verbose`](https://code.claude.com/docs/en/settings-reference#verbose) setting.
1286    ///
1287    /// - **Values**: string, one of:
1288    ///   - `"default"`: the normal transcript with truncated tool output
1289    ///   - `"verbose"`: the transcript with full tool output
1290    ///   - `"focus"`: only your last prompt, a one-line summary of tool calls with edit
1291    ///     diffstats, and the final response. Focus view needs the [fullscreen
1292    ///     renderer](https://code.claude.com/docs/en/settings-reference#tui)
1293    /// - **Default**: unset, so the `verbose` setting and your last `/focus` choice apply
1294    /// - **Scope**: any settings file.
1295    ///
1296    /// Docs: [`viewMode`](https://code.claude.com/docs/en/settings-reference#viewmode).
1297    #[serde(skip_serializing_if = "Option::is_none")]
1298    pub view_mode: Option<ViewMode>,
1299    /// Choose whether Claude Code uses the auto mode classifier to review shell commands in
1300    /// plan mode. With the default `true`, the classifier reviews each command during planning
1301    /// when auto mode is available and you see no prompt, except for [critical-path
1302    /// removals](https://code.claude.com/docs/en/permission-modes#critical-paths). Set `false`
1303    /// to get a permission prompt for every command outside the built-in read-only set.
1304    ///
1305    /// - **Values**: Boolean
1306    ///   - `true`: the same as unset; when auto mode is available, the classifier reviews shell
1307    ///     commands during planning
1308    ///   - `false`: you get a permission prompt for every command outside the built-in
1309    ///     read-only set
1310    /// - **Default**: `true`
1311    /// - **Scope**: user, local, or managed. A repository can't turn it off for you.   * A
1312    ///   `false` in any of these files or in `--settings` turns it off, unless you leave that
1313    ///   user or local file out with an option such as --setting-sources.
1314    ///
1315    /// Docs: [`useAutoModeDuringPlan`](https://code.claude.com/docs/en/settings-reference#useautomodeduringplan).
1316    #[serde(skip_serializing_if = "Option::is_none")]
1317    pub use_auto_mode_during_plan: Option<bool>,
1318    /// **Warning:** Deprecated since v2.1.92, when the
1319    /// [`voice`](https://code.claude.com/docs/en/settings-reference#voice) object replaced it.
1320    /// Claude Code still reads it so older settings files keep working, but new configurations
1321    /// should set `voice.enabled`. Turn voice dictation on with the single Boolean form that
1322    /// predates the `voice` object.
1323    ///
1324    /// - **Values**: Boolean
1325    ///   - `true`: voice dictation is on when you're logged in with a claude.ai account and
1326    ///     your organization's policy allows voice, unless `voice.enabled` is set
1327    ///   - `false`: voice dictation is off, unless `voice.enabled` is set
1328    /// - **Default**: unset
1329    /// - **Scope**: any settings file.
1330    ///
1331    /// Docs: [`voiceEnabled`](https://code.claude.com/docs/en/settings-reference#voiceenabled).
1332    #[serde(skip_serializing_if = "Option::is_none")]
1333    pub voice_enabled: Option<bool>,
1334    /// Have Claude Code on WSL read managed settings from the Windows policy chain, with HKLM
1335    /// and the Windows managed settings file taking priority over `/etc/claude-code` and HKCU
1336    /// below it. While the chain is on, Claude Code reads `/etc/claude-code` only when [no
1337    /// Windows admin document is
1338    /// present](https://code.claude.com/docs/en/managed-settings#present-admin-documents) in
1339    /// the HKLM registry value or the `C:\Program Files\ClaudeCode\` folder. Set it to extend
1340    /// the policy you already deploy on Windows to WSL sessions on the same machine, so they
1341    /// follow the same rules as host sessions.
1342    ///
1343    /// - **Values**: Boolean
1344    ///   - `true`: Claude Code on WSL reads managed settings from the Windows policy chain, and
1345    ///     reads `/etc/claude-code` only when no Windows admin document is present
1346    ///   - `false`: WSL reads only `/etc/claude-code`
1347    /// - **Default**: `false`, so WSL reads only `/etc/claude-code`
1348    /// - **Scope**: managed. In an admin-controlled Windows source.
1349    ///
1350    /// Docs: [`wslInheritsWindowsSettings`](https://code.claude.com/docs/en/settings-reference#wslinheritswindowssettings).
1351    #[serde(skip_serializing_if = "Option::is_none")]
1352    pub wsl_inherits_windows_settings: Option<bool>,
1353    /// Status line configuration for subagent sessions.
1354    ///
1355    /// - **Values**: object
1356    /// - **Default**: unset
1357    ///
1358    /// Docs: not in the settings reference; listed in the
1359    /// [JSON schema](https://json.schemastore.org/claude-code-settings.json).
1360    #[serde(skip_serializing_if = "Option::is_none")]
1361    pub subagent_status_line: Option<CommandSetting>,
1362    /// Pick which model answers when Claude calls the server-side [advisor
1363    /// tool](https://code.claude.com/docs/en/advisor). Unset it to turn the advisor off. The
1364    /// advisor must be at least as capable as your main model.
1365    ///
1366    /// - **Values**: string, one of the aliases `"fable"`, `"opus"`, or `"sonnet"`, which
1367    ///   resolve to Claude Code's current default version of that model family, or a full model
1368    ///   ID such as `"claude-opus-5-5"`
1369    /// - **Default**: unset, so the advisor is off
1370    /// - **Scope**: any settings file.
1371    ///
1372    /// Docs: [`advisorModel`](https://code.claude.com/docs/en/settings-reference#advisormodel).
1373    #[serde(skip_serializing_if = "Option::is_none")]
1374    pub advisor_model: Option<String>,
1375    /// Have Claude Code [compact the conversation
1376    /// automatically](https://code.claude.com/docs/en/context-window#when-your-context-fills-up)
1377    /// when context approaches the limit. Appears in `/config` as **Auto-compact**, and
1378    /// toggling it there writes this key to your user settings.
1379    ///
1380    /// - **Values**: Boolean
1381    ///   - `true`: Claude Code compacts the conversation automatically when context approaches
1382    ///     the limit
1383    ///   - `false`: Claude Code doesn't compact automatically
1384    /// - **Default**: `true`
1385    /// - **Scope**: any settings file.
1386    ///
1387    /// Docs: [`autoCompactEnabled`](https://code.claude.com/docs/en/settings-reference#autocompactenabled).
1388    #[serde(skip_serializing_if = "Option::is_none")]
1389    pub auto_compact_enabled: Option<bool>,
1390    /// Turn off [background agents and agent view](https://code.claude.com/docs/en/agent-view):
1391    /// `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Set it in [managed
1392    /// settings](https://code.claude.com/docs/en/managed-settings) to enforce it for an
1393    /// organization.
1394    ///
1395    /// - **Values**: Boolean
1396    ///   - `true`: Claude Code turns off `claude agents`, `--bg`, `/background`, and the
1397    ///     on-demand supervisor
1398    ///   - `false`: agent view is available
1399    /// - **Default**: unset, so agent view is available
1400    /// - **Scope**: any settings file.
1401    ///
1402    /// Docs: [`disableAgentView`](https://code.claude.com/docs/en/settings-reference#disableagentview).
1403    #[serde(skip_serializing_if = "Option::is_none")]
1404    pub disable_agent_view: Option<bool>,
1405    /// Choose the key binding mode for the input prompt.
1406    ///
1407    /// - **Values**: string, one of:
1408    ///   - `"normal"`: standard key bindings in the prompt input
1409    ///   - `"vim"`: vim-style editing with NORMAL, INSERT, and VISUAL modes
1410    /// - **Default**: `"normal"`
1411    /// - **Scope**: any settings file.
1412    ///
1413    /// Docs: [`editorMode`](https://code.claude.com/docs/en/settings-reference#editormode).
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    pub editor_mode: Option<EditorMode>,
1416    /// The `/model` picker has a **Default** option, and [`default` model
1417    /// setting](https://code.claude.com/docs/en/model-config#default-model-setting) describes
1418    /// the model it resolves to. An
1419    /// [`availableModels`](https://code.claude.com/docs/en/settings-reference#availablemodels)
1420    /// allowlist limits the models you can name, but with the default [prefix
1421    /// matching](https://code.claude.com/docs/en/settings-reference#availablemodelsmatch) it
1422    /// doesn't remap your account type's default, so **Default** can still resolve to a model
1423    /// outside the list. This key closes that gap.
1424    ///
1425    /// - **Values**: Boolean
1426    ///   - `true`: when **Default** would resolve to a model outside `availableModels`, Claude
1427    ///     Code resolves it to the first available model in the list
1428    ///   - `false`: this key doesn't change how **Default** resolves
1429    /// - **Default**: `false`
1430    /// - **Scope**: any settings file.
1431    ///
1432    /// Docs: [`enforceAvailableModels`](https://code.claude.com/docs/en/settings-reference#enforceavailablemodels).
1433    #[serde(skip_serializing_if = "Option::is_none")]
1434    pub enforce_available_models: Option<bool>,
1435    /// Name backup models for Claude Code to try, in order, when your primary model is
1436    /// overloaded or unavailable. Claude Code switches to the next available model in the chain
1437    /// for the rest of the turn and shows a notice. Without a chain, Claude Code retries the
1438    /// same model and then surfaces the server's error, and you retry or switch models
1439    /// yourself.
1440    ///
1441    /// - **Values**: array of model aliases or IDs; `"default"` expands to the default model
1442    /// - **Default**: unset, so a failed request isn't retried on another model
1443    /// - **Scope**: any settings file.
1444    ///
1445    /// Docs: [`fallbackModel`](https://code.claude.com/docs/en/settings-reference#fallbackmodel).
1446    #[serde(skip_serializing_if = "Option::is_none")]
1447    pub fallback_model: Option<Vec<String>>,
1448    /// Have Claude Code snapshot files before each edit so
1449    /// [`/rewind`](https://code.claude.com/docs/en/checkpointing) can restore them. Appears in
1450    /// `/config` as **Rewind code (checkpoints)**, and toggling it there writes this key to
1451    /// your user settings.
1452    ///
1453    /// - **Values**: Boolean
1454    ///   - `true`: Claude Code snapshots files before each edit so `/rewind` can restore them
1455    ///   - `false`: Claude Code doesn't snapshot files, so `/rewind` can't restore them
1456    /// - **Default**: `true`
1457    /// - **Scope**: any settings file.
1458    ///
1459    /// Docs: [`fileCheckpointingEnabled`](https://code.claude.com/docs/en/settings-reference#filecheckpointingenabled).
1460    #[serde(skip_serializing_if = "Option::is_none")]
1461    pub file_checkpointing_enabled: Option<bool>,
1462    /// Run your own command to refresh Google Cloud Application Default Credentials when Claude
1463    /// Code finds they've expired or can't be loaded, so [Google Cloud's Agent
1464    /// Platform](https://code.claude.com/docs/en/google-vertex-ai) requests keep working
1465    /// without you re-authenticating by hand. When several Claude Code processes that use the
1466    /// same command and credentials, such as separate terminals or IDE windows, find them
1467    /// expired at the same time, one process runs the command and the rest wait for that run
1468    /// instead of starting their own. A process that has waited 60 seconds with a request
1469    /// pending runs the command itself.
1470    ///
1471    /// - **Values**: string, a shell command line
1472    /// - **Default**: unset, so Claude Code's credential error tells you to run `gcloud auth
1473    ///   application-default login` yourself
1474    /// - **Scope**: any settings file.
1475    ///
1476    /// Docs: [`gcpAuthRefresh`](https://code.claude.com/docs/en/settings-reference#gcpauthrefresh).
1477    #[serde(skip_serializing_if = "Option::is_none")]
1478    pub gcp_auth_refresh: Option<String>,
1479    /// Provide remote MCP servers to every user from managed settings. Users keep the servers
1480    /// they add themselves and can't edit or remove the ones you provide. Requires Claude Code
1481    /// v2.1.259 or later.
1482    ///
1483    /// - **Values**: object keyed by server name. Each entry has the `.mcp.json` shape for an
1484    ///   `http` or `sse` server: a required `https://` `url`, and optionally `headers`,
1485    ///   `oauth`, and the other HTTP and SSE options. Claude Code drops entries that fail
1486    ///   validation, and [What an entry can
1487    ///   contain](https://code.claude.com/docs/en/managed-mcp#what-an-entry-can-contain) lists
1488    ///   the conditions
1489    /// - **Default**: unset, so managed settings provide no servers
1490    /// - **Scope**: managed. Claude Code drops the key with a warning in user, project, and
1491    ///   local settings, and doesn't read it in the Claude Desktop app's Code tab on a
1492    ///   third-party deployment or in the app's Cowork sessions, where Claude Desktop supplies
1493    ///   and locks those sessions' MCP servers itself.
1494    ///
1495    /// Docs: [`managedMcpServers`](https://code.claude.com/docs/en/settings-reference#managedmcpservers).
1496    #[serde(skip_serializing_if = "Option::is_none")]
1497    pub managed_mcp_servers: Option<ManagedMcpServers>,
1498    /// Each turn, Claude sees a [listing of your
1499    /// skills](https://code.claude.com/docs/en/skills#skill-descriptions-are-cut-short) that
1500    /// shows each skill's `description` and `when_to_use` text. This key caps how many
1501    /// characters of that text Claude Code shows per skill; longer text is cut at the cap.
1502    ///
1503    /// - **Values**: number of characters, a positive integer
1504    /// - **Default**: `1536`
1505    /// - **Scope**: any settings file.
1506    ///
1507    /// Docs: [`skillListingMaxDescChars`](https://code.claude.com/docs/en/settings-reference#skilllistingmaxdescchars).
1508    #[serde(skip_serializing_if = "Option::is_none")]
1509    pub skill_listing_max_desc_chars: Option<u64>,
1510    /// Choose how Claude Code notifies you when a task completes or a permission prompt is
1511    /// waiting. A [mod's
1512    /// notifications](https://code.claude.com/docs/en/plugins/mods/api#show-something-without-starting-a-turn)
1513    /// use the same setting. Appears in `/config` as **Local notifications**.
1514    ///
1515    /// - **Values**: string, one of:
1516    ///   - `"auto"`: Claude Code sends a desktop notification when it detects iTerm2, Ghostty,
1517    ///     or Kitty, rings the bell in Terminal.app only when its audible bell is off, and does
1518    ///     nothing elsewhere
1519    ///   - `"terminal_bell"`: Claude Code rings the bell character in any terminal
1520    ///   - `"iterm2"`: Claude Code sends an iTerm2 desktop notification
1521    ///   - `"iterm2_with_bell"`: Claude Code sends an iTerm2 desktop notification and rings the
1522    ///     bell
1523    ///   - `"kitty"`: Claude Code sends a Kitty desktop notification
1524    ///   - `"ghostty"`: Claude Code sends a Ghostty desktop notification
1525    ///   - `"notifications_disabled"`: Claude Code sends no notification
1526    /// - **Default**: `"auto"`
1527    /// - **Scope**: any settings file. Claude Code also reads a value left in `~/.claude.json`
1528    ///   by older versions.
1529    ///
1530    /// Docs: [`preferredNotifChannel`](https://code.claude.com/docs/en/settings-reference#preferrednotifchannel).
1531    #[serde(skip_serializing_if = "Option::is_none")]
1532    pub preferred_notif_channel: Option<NotifChannel>,
1533    /// Name the marketplaces whose plugins can appear as contextual install suggestions, in
1534    /// spinner tips and pinned at the top of the `/plugin` **Discover** tab. The built-in
1535    /// first-party frontend-design tip is unaffected. Suggestions come from each plugin's
1536    /// `relevance` declaration in its marketplace entry.
1537    ///
1538    /// - **Values**: array of marketplace names
1539    /// - **Default**: unset, so no marketplace-declared suggestions surface
1540    /// - **Scope**: managed.
1541    ///
1542    /// Docs: [`pluginSuggestionMarketplaces`](https://code.claude.com/docs/en/settings-reference#pluginsuggestionmarketplaces).
1543    #[serde(skip_serializing_if = "Option::is_none")]
1544    pub plugin_suggestion_marketplaces: Option<Vec<String>>,
1545    /// Set the newest Claude Code version your organization allows to start. When the running
1546    /// version is newer, Claude Code exits at startup and tells the user to install an approved
1547    /// version through your organization's approved method; `claude install <version>` may also
1548    /// work. Requires Claude Code v2.1.163 or later.
1549    ///
1550    /// - **Values**: string, a version number such as `"2.1.150"`; a value that isn't a valid
1551    ///   version is ignored
1552    /// - **Default**: unset, so no ceiling applies
1553    /// - **Scope**: managed. Claude Code gives no warning when it ignores the key elsewhere.
1554    ///
1555    /// Docs: [`requiredMaximumVersion`](https://code.claude.com/docs/en/settings-reference#requiredmaximumversion).
1556    #[serde(skip_serializing_if = "Option::is_none")]
1557    pub required_maximum_version: Option<String>,
1558    /// Set the oldest Claude Code version your organization allows to start. When the running
1559    /// version is older, Claude Code exits at startup and tells the user to update through your
1560    /// organization's approved method. The check runs at startup only, so a session that's
1561    /// already running continues.
1562    ///
1563    /// - **Values**: string, a version number such as `"2.1.150"`; a value that isn't a valid
1564    ///   version is ignored
1565    /// - **Default**: unset, so no floor applies
1566    /// - **Scope**: managed. Claude Code gives no warning when it ignores the key elsewhere.
1567    ///
1568    /// Docs: [`requiredMinimumVersion`](https://code.claude.com/docs/en/settings-reference#requiredminimumversion).
1569    #[serde(skip_serializing_if = "Option::is_none")]
1570    pub required_minimum_version: Option<String>,
1571    /// Choose whether Claude responds after you run a shell command with the [`!`
1572    /// prefix](https://code.claude.com/docs/en/interactive-mode#shell-mode-with-prefix) in the
1573    /// input box. By default, Claude Code adds the command's output to the conversation and
1574    /// Claude replies to it. Set this key to `false` to add the output to context without a
1575    /// reply, so you can run several commands and ask about them together.
1576    ///
1577    /// - **Values**: Boolean
1578    ///   - `true`: Claude Code adds the command's output to the conversation and Claude replies
1579    ///     to it
1580    ///   - `false`: Claude Code adds the output to context without a reply
1581    /// - **Default**: `true`
1582    /// - **Scope**: any settings file.
1583    ///
1584    /// Docs: [`respondToBashCommands`](https://code.claude.com/docs/en/settings-reference#respondtobashcommands).
1585    #[serde(skip_serializing_if = "Option::is_none")]
1586    pub respond_to_bash_commands: Option<bool>,
1587    /// Each turn, Claude sees a [listing of your
1588    /// skills](https://code.claude.com/docs/en/skills#skill-descriptions-are-cut-short) with
1589    /// their descriptions, and Claude Code caps that listing at a share of the context window.
1590    /// When the listing is over the cap, Claude Code keeps every skill's name but drops the
1591    /// descriptions of the least-used skills, so Claude can still invoke those skills but is
1592    /// less likely to choose one on its own. Raise this key to keep more descriptions visible
1593    /// at the cost of more context per turn.
1594    ///
1595    /// - **Values**: number, a fraction greater than `0` and at most `1`
1596    /// - **Default**: `0.01`, which reserves 1% of the context window
1597    /// - **Scope**: any settings file.
1598    ///
1599    /// Docs: [`skillListingBudgetFraction`](https://code.claude.com/docs/en/settings-reference#skilllistingbudgetfraction).
1600    #[serde(skip_serializing_if = "Option::is_none")]
1601    pub skill_listing_budget_fraction: Option<f64>,
1602    /// Add SSH connections to the
1603    /// [Desktop](https://code.claude.com/docs/en/desktop#pre-configure-ssh-connections-for-your-team)
1604    /// environment selector. Administrators use `sshConfigs` to distribute shared connections
1605    /// to a team. Users can select a managed connection and [set their own **Worktree
1606    /// folder**](https://code.claude.com/docs/en/desktop#set-the-worktree-folder-on-an-existing-connection)
1607    /// for it.
1608    ///
1609    /// - **Values**: array of objects, each with required `id`, `name`, and `sshHost` and
1610    ///   optional `sshPort` and `sshIdentityFile`
1611    /// - **Default**: unset
1612    /// - **Scope**: user or managed. The desktop app reads this key.
1613    ///
1614    /// Docs: [`sshConfigs`](https://code.claude.com/docs/en/settings-reference#sshconfigs).
1615    #[serde(skip_serializing_if = "Option::is_none")]
1616    pub ssh_configs: Option<Vec<SshConfig>>,
1617    /// Limit the hosts a [Desktop SSH
1618    /// session](https://code.claude.com/docs/en/desktop#restrict-which-ssh-hosts-users-can-connect-to)
1619    /// can connect to. Only the Desktop app reads this key; the CLI doesn't. Patterns are
1620    /// case-insensitive: `*` matches any host, `*.example.com` matches `example.com` and every
1621    /// subdomain, and anything else is an exact match against the hostname after
1622    /// `~/.ssh/config` resolution.
1623    ///
1624    /// - **Values**: array of hostname patterns
1625    /// - **Default**: unset, so any host is allowed
1626    /// - **Scope**: managed. By default, Desktop reads the key from [one managed
1627    ///   source](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources).
1628    ///
1629    /// Docs: [`sshHostAllowlist`](https://code.claude.com/docs/en/settings-reference#sshhostallowlist).
1630    #[serde(skip_serializing_if = "Option::is_none")]
1631    pub ssh_host_allowlist: Option<Vec<String>>,
1632    /// Pick the color theme for the interface. Appears in `/config` as **Theme**.
1633    ///
1634    /// - **Values**: string, one of:
1635    ///   - `"auto"`: matches your terminal's light or dark background
1636    ///   - `"dark"`: the dark theme
1637    ///   - `"light"`: the light theme
1638    ///   - `"dark-daltonized"`: the dark theme with colorblind-friendly colors
1639    ///   - `"light-daltonized"`: the light theme with colorblind-friendly colors
1640    ///   - `"dark-ansi"`: the dark theme using only your terminal's ANSI color palette
1641    ///   - `"light-ansi"`: the light theme using only your terminal's ANSI color palette
1642    ///   - `"custom:<slug>"` or `"custom:<plugin-name>:<slug>"`: a custom theme from
1643    ///     `~/.claude/themes/` or a plugin
1644    /// - **Default**: `"dark"`
1645    /// - **Scope**: any settings file. A value in `~/.claude.json` from an older version
1646    ///   applies when no settings file sets it.
1647    ///
1648    /// Docs: [`theme`](https://code.claude.com/docs/en/settings-reference#theme).
1649    #[serde(skip_serializing_if = "Option::is_none")]
1650    pub theme: Option<Theme>,
1651    /// Turn on [voice dictation](https://code.claude.com/docs/en/voice-dictation) and choose
1652    /// how the dictation key behaves. Claude Code writes this object for you when you run
1653    /// `/voice`.
1654    ///
1655    /// - **Values**: object with `enabled` as a Boolean, `autoSubmit` as a Boolean that applies
1656    ///   in hold mode only, and `mode`, one of:
1657    ///   - `"hold"`: you hold the dictation key while speaking and release it to stop
1658    ///   - `"tap"`: you tap the key once to start recording and again to send
1659    /// - **Default**: unset, so dictation is off; when `enabled` is `true` and `mode` is unset,
1660    ///   Claude Code uses `"hold"`
1661    /// - **Scope**: any settings file.
1662    ///
1663    /// Docs: [`voice`](https://code.claude.com/docs/en/settings-reference#voice).
1664    #[serde(skip_serializing_if = "Option::is_none")]
1665    pub voice: Option<Voice>,
1666    /// Accelerate mouse-wheel scroll speed during fast scrolls in [fullscreen
1667    /// rendering](https://code.claude.com/docs/en/fullscreen#mouse-wheel-scrolling). Set it to
1668    /// `false` for a constant scroll rate per wheel notch.
1669    ///
1670    /// - **Values**: Boolean
1671    ///   - `true`: Claude Code accelerates mouse-wheel scroll speed during fast scrolls
1672    ///   - `false`: Claude Code scrolls at a constant rate per wheel notch
1673    /// - **Default**: `true`
1674    /// - **Scope**: any settings file.
1675    ///
1676    /// Docs: [`wheelScrollAccelerationEnabled`](https://code.claude.com/docs/en/settings-reference#wheelscrollaccelerationenabled).
1677    #[serde(skip_serializing_if = "Option::is_none")]
1678    pub wheel_scroll_acceleration_enabled: Option<bool>,
1679    /// Turn off the [skills](https://code.claude.com/docs/en/skills) and workflows included
1680    /// with Claude Code. Claude Code removes bundled skills and workflows entirely, while
1681    /// built-in commands such as `/init` stay typable but are hidden from the model.
1682    ///
1683    /// - **Values**: Boolean
1684    ///   - `true`: Claude Code removes bundled skills and workflows and hides built-in commands
1685    ///     such as `/init` from the model
1686    ///   - `false`: bundled skills load
1687    /// - **Default**: unset, so bundled skills load
1688    /// - **Scope**: any settings file.
1689    ///
1690    /// Docs: [`disableBundledSkills`](https://code.claude.com/docs/en/settings-reference#disablebundledskills).
1691    #[serde(skip_serializing_if = "Option::is_none")]
1692    pub disable_bundled_skills: Option<bool>,
1693    /// Show a one-line session recap when you return to the terminal after a few minutes away.
1694    /// Set it to `false`, or turn off **Session recap** in `/config`, to stop the recap.
1695    ///
1696    /// - **Values**: Boolean
1697    ///   - `true`: you see a one-line session recap when you return after a few minutes away
1698    ///   - `false`: Claude Code shows no recap
1699    /// - **Default**: unset, so the recap is on
1700    /// - **Scope**: any settings file.
1701    ///
1702    /// Docs: [`awaySummaryEnabled`](https://code.claude.com/docs/en/settings-reference#awaysummaryenabled).
1703    #[serde(skip_serializing_if = "Option::is_none")]
1704    pub away_summary_enabled: Option<bool>,
1705    /// Follow new output to the bottom of the conversation in [fullscreen
1706    /// rendering](https://code.claude.com/docs/en/fullscreen). Turn it off to stay where you
1707    /// scrolled while Claude keeps working; permission prompts still scroll into view.
1708    ///
1709    /// - **Values**: Boolean
1710    ///   - `true`: the conversation follows new output to the bottom
1711    ///   - `false`: you stay where you scrolled while Claude keeps working; permission prompts
1712    ///     still appear below the transcript
1713    /// - **Default**: `true`
1714    /// - **Scope**: any settings file.
1715    ///
1716    /// Docs: [`autoScrollEnabled`](https://code.claude.com/docs/en/settings-reference#autoscrollenabled).
1717    #[serde(skip_serializing_if = "Option::is_none")]
1718    pub auto_scroll_enabled: Option<bool>,
1719    /// Load the [claude.ai
1720    /// connectors](https://code.claude.com/docs/en/mcp#use-mcp-servers-from-claude-ai) Claude
1721    /// Code fetches itself alongside a deployed `managed-mcp.json`. Without this key,
1722    /// `managed-mcp.json` takes exclusive control of MCP servers and suppresses those
1723    /// connectors.
1724    ///
1725    /// - **Values**: Boolean
1726    ///   - `true`: Claude Code loads the claude.ai connectors alongside a deployed
1727    ///     `managed-mcp.json`
1728    ///   - `false`: a deployed `managed-mcp.json` takes exclusive control of MCP servers and
1729    ///     suppresses the claude.ai connectors [Claude Code fetches
1730    ///     itself](https://code.claude.com/docs/en/mcp#how-connectors-reach-claude-code)
1731    /// - **Default**: `false`, so a deployed `managed-mcp.json` suppresses the claude.ai
1732    ///   connectors Claude Code fetches itself
1733    /// - **Scope**: managed. Users can't re-enable connectors that exclusive control
1734    ///   suppressed.
1735    ///
1736    /// Docs: [`allowAllClaudeAiMcps`](https://code.claude.com/docs/en/settings-reference#allowallclaudeaimcps).
1737    #[serde(skip_serializing_if = "Option::is_none")]
1738    pub allow_all_claude_ai_mcps: Option<bool>,
1739    /// Allow Claude to send a push notification to your phone when it decides one is worth
1740    /// sending, for example when a long task finishes. In a local session, Claude can send one
1741    /// while [Remote Control](https://code.claude.com/docs/en/remote-control) is connected.
1742    /// Appears in `/config` as **Push when Claude decides**. When you change it there, Claude
1743    /// Code also saves the value to your account.
1744    ///
1745    /// - **Values**: Boolean
1746    ///   - `true`: Claude can send a push notification to your phone when it decides one is
1747    ///     worth sending
1748    ///   - `false`: Claude doesn't send those notifications
1749    /// - **Default**: `false`
1750    /// - **Scope**: any settings file. Claude Code also reads a value left in `~/.claude.json`
1751    ///   by older versions.
1752    ///
1753    /// Docs: [`agentPushNotifEnabled`](https://code.claude.com/docs/en/settings-reference#agentpushnotifenabled).
1754    #[serde(skip_serializing_if = "Option::is_none")]
1755    pub agent_push_notif_enabled: Option<bool>,
1756    /// Render screen-reader friendly output: flat text without decorative borders or
1757    /// animations. Screen-reader mode uses the classic renderer, so the `tui` setting has no
1758    /// effect while it is active; attached [background
1759    /// sessions](https://code.claude.com/docs/en/agent-view) still render fullscreen.
1760    ///
1761    /// - **Values**: Boolean
1762    ///   - `true`: Claude Code renders flat text without decorative borders or animations,
1763    ///     using the classic renderer
1764    ///   - `false`: Claude Code renders normally
1765    /// - **Default**: unset, so screen-reader mode is off
1766    /// - **Scope**: user or managed. You can also set the key in a file you pass with
1767    ///   `--settings`.
1768    ///
1769    /// Docs: [`axScreenReader`](https://code.claude.com/docs/en/settings-reference#axscreenreader).
1770    #[serde(skip_serializing_if = "Option::is_none")]
1771    pub ax_screen_reader: Option<bool>,
1772    /// Inject CLAUDE.md-style instructions as organization-managed memory without deploying a
1773    /// separate file. Claude Code loads the text as a managed memory entry ahead of user and
1774    /// project CLAUDE.md files.
1775    ///
1776    /// - **Values**: string, the text of a CLAUDE.md file; write it as you would the file,
1777    ///   Markdown included, with line breaks as `\n`
1778    /// - **Default**: unset
1779    /// - **Scope**: managed.
1780    ///
1781    /// Docs: [`claudeMd`](https://code.claude.com/docs/en/settings-reference#claudemd).
1782    #[serde(skip_serializing_if = "Option::is_none")]
1783    pub claude_md: Option<String>,
1784    /// **Warning:** Deprecated, and replaced by
1785    /// [`enableArtifact`](https://code.claude.com/docs/en/settings-reference#enableartifact).
1786    /// Claude Code still honors `disableArtifact: true` as equivalent to `enableArtifact:
1787    /// false`, and ignores `disableArtifact: false`. Use
1788    /// [`enableArtifact`](https://code.claude.com/docs/en/settings-reference#enableartifact)
1789    /// instead to turn off the [Artifact](https://code.claude.com/docs/en/artifacts) tool,
1790    /// which publishes session output as a private web page on claude.ai.
1791    ///
1792    /// - **Values**: Boolean
1793    ///   - `true`: Claude Code turns the Artifact tool off for every session the file applies
1794    ///     to, and no other file turns it back on
1795    ///   - `false`: ignored; to leave the tool on, remove the key
1796    /// - **Default**: unset, so the tool follows your account's
1797    ///   [availability](https://code.claude.com/docs/en/artifacts#availability)
1798    /// - **Scope**: any settings file.
1799    ///
1800    /// Docs: [`disableArtifact`](https://code.claude.com/docs/en/settings-reference#disableartifact).
1801    #[serde(skip_serializing_if = "Option::is_none")]
1802    pub disable_artifact: Option<bool>,
1803    /// Remove [auto
1804    /// mode](https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode)
1805    /// from the `Shift+Tab` cycle. Any session that would otherwise [start in auto
1806    /// mode](https://code.claude.com/docs/en/permission-modes#which-mode-a-session-starts-in),
1807    /// whether from `--permission-mode auto`, a settings file, or the built-in default, starts
1808    /// in `default` instead. Administrators set it in managed settings to prevent developers in
1809    /// their organization from using auto mode.
1810    ///
1811    /// - **Values**: the string `"disable"`
1812    /// - **Default**: unset
1813    /// - **Scope**: any settings file. Most useful in [managed
1814    ///   settings](https://code.claude.com/docs/en/managed-settings), where users can't
1815    ///   override it.
1816    ///
1817    /// Docs: [`disableAutoMode`](https://code.claude.com/docs/en/settings-reference#disableautomode).
1818    #[serde(skip_serializing_if = "Option::is_none")]
1819    pub disable_auto_mode: Option<DisableFlag>,
1820    /// Turn off the [claude.ai MCP
1821    /// connectors](https://code.claude.com/docs/en/mcp#use-mcp-servers-from-claude-ai) [Claude
1822    /// Code fetches
1823    /// itself](https://code.claude.com/docs/en/mcp#how-connectors-reach-claude-code), so it
1824    /// neither fetches nor connects them. A `true` in any settings file applies: a checked-in
1825    /// project `.claude/settings.json` can opt a repository out of those connectors, but a
1826    /// project-level `false` can't override a user- or managed-level `true`.
1827    ///
1828    /// - **Values**: Boolean
1829    ///   - `true`: Claude Code neither fetches nor connects those connectors
1830    ///   - `false`: the same as unset; Claude Code fetches your connectors unless another
1831    ///     settings file or `ENABLE_CLAUDEAI_MCP_SERVERS` turns them off
1832    /// - **Default**: `false`, so Claude Code fetches your connectors
1833    /// - **Scope**: any settings file.
1834    ///
1835    /// Docs: [`disableClaudeAiConnectors`](https://code.claude.com/docs/en/settings-reference#disableclaudeaiconnectors).
1836    #[serde(skip_serializing_if = "Option::is_none")]
1837    pub disable_claude_ai_connectors: Option<bool>,
1838    /// Turn off [Remote Control](https://code.claude.com/docs/en/remote-control): Claude Code
1839    /// then refuses `claude remote-control`, the `--remote-control` flag, auto-start, and the
1840    /// in-session toggle, and reports that your organization's policy disabled it. Place it in
1841    /// [managed settings](https://code.claude.com/docs/en/managed-settings) for per-device MDM
1842    /// enforcement.
1843    ///
1844    /// - **Values**: Boolean
1845    ///   - `true`: Claude Code refuses `claude remote-control`, the `--remote-control` flag,
1846    ///     auto-start, and the in-session toggle
1847    ///   - `false`: Remote Control stays available
1848    /// - **Default**: `false`
1849    /// - **Scope**: any settings file.
1850    ///
1851    /// Docs: [`disableRemoteControl`](https://code.claude.com/docs/en/settings-reference#disableremotecontrol).
1852    #[serde(skip_serializing_if = "Option::is_none")]
1853    pub disable_remote_control: Option<bool>,
1854    /// Turn off [dynamic
1855    /// workflows](https://code.claude.com/docs/en/workflows#turn-workflows-off) and the bundled
1856    /// workflow commands for everyone your settings reach, such as an organization through
1857    /// managed settings. To turn workflows on or off just for yourself, use
1858    /// [`enableWorkflows`](https://code.claude.com/docs/en/settings-reference#enableworkflows)
1859    /// instead, which the **Dynamic workflows** toggle in `/config` writes to your user
1860    /// settings.
1861    ///
1862    /// - **Values**: Boolean
1863    ///   - `true`: Claude Code turns off dynamic workflows and the bundled workflow commands
1864    ///     for everyone your settings reach
1865    ///   - `false`: the same as unset; whether workflows are on then follows
1866    ///     [`enableWorkflows`](https://code.claude.com/docs/en/settings-reference#enableworkflows)
1867    ///     and your plan's default
1868    /// - **Default**: `false`
1869    /// - **Scope**: any settings file.
1870    ///
1871    /// Docs: [`disableWorkflows`](https://code.claude.com/docs/en/settings-reference#disableworkflows).
1872    #[serde(skip_serializing_if = "Option::is_none")]
1873    pub disable_workflows: Option<bool>,
1874    /// Render extra clickable badges in the footer below the input box when a regex matches
1875    /// turn output: tool results, including file contents and fetched pages, and Claude's own
1876    /// responses. Use it to turn IDs printed by project CLIs, such as review tools and issue
1877    /// trackers, into session links.
1878    ///
1879    /// - **Values**: array of objects, each with `type` set to `"regex"`, a `pattern` regex, a
1880    ///   `url` template, and an optional `label`; `{name}` placeholders in `url` and `label`
1881    ///   are filled from named capture groups in `pattern`
1882    /// - **Default**: unset, so no badges render
1883    /// - **Scope**: user or managed.
1884    ///
1885    /// Docs: [`footerLinksRegexes`](https://code.claude.com/docs/en/settings-reference#footerlinksregexes).
1886    #[serde(skip_serializing_if = "Option::is_none")]
1887    pub footer_links_regexes: Option<Vec<FooterLink>>,
1888    /// Get a push notification on your phone when a permission prompt or question is waiting
1889    /// for your input. In a local session, Claude Code sends these only while [Remote
1890    /// Control](https://code.claude.com/docs/en/remote-control) is connected. Appears in
1891    /// `/config` as **Push when actions required**.
1892    ///
1893    /// - **Values**: Boolean
1894    /// - **Default**: `false`
1895    /// - **Scope**: any settings file. Claude Code also reads a value left in `~/.claude.json`
1896    ///   by older versions.
1897    ///
1898    /// Docs: [`inputNeededNotifEnabled`](https://code.claude.com/docs/en/settings-reference#inputneedednotifenabled).
1899    #[serde(skip_serializing_if = "Option::is_none")]
1900    pub input_needed_notif_enabled: Option<bool>,
1901    /// Run an executable you deploy that computes managed settings at startup, so you can
1902    /// derive policy from device posture, identity, or a remote service instead of a static
1903    /// file. Claude Code runs the helper before it accepts the first prompt and treats the
1904    /// settings it emits as the managed settings for the session.
1905    ///
1906    /// - **Values**: object with `path`, `timeoutMs`, and `refreshIntervalMs`
1907    /// - **Default**: unset, so no helper runs
1908    /// - **Scope**: managed. Read from the macOS plist, the Windows HKLM registry, or the
1909    ///   managed settings file.
1910    ///
1911    /// Docs: [`policyHelper`](https://code.claude.com/docs/en/settings-reference#policyhelper).
1912    #[serde(skip_serializing_if = "Option::is_none")]
1913    pub policy_helper: Option<PolicyHelper>,
1914    /// Connect [Remote Control](https://code.claude.com/docs/en/remote-control) automatically
1915    /// when each interactive session starts, instead of waiting for `/remote-control`. Set it
1916    /// to `true` to turn auto-connect on, `false` to turn it off. Appears in `/config` as
1917    /// **Enable Remote Control for all sessions**.
1918    ///
1919    /// - **Values**: Boolean
1920    ///   - `true`: Claude Code connects Remote Control automatically when each interactive
1921    ///     session starts
1922    ///   - `false`: Claude Code waits for `/remote-control`
1923    /// - **Default**: unset, so the [auto-connect
1924    ///   default](https://code.claude.com/docs/en/remote-control#enable-remote-control-for-all-sessions)
1925    ///   applies
1926    /// - **Scope**: any settings file. Claude Code also reads a value left in `~/.claude.json`
1927    ///   by older versions.
1928    ///
1929    /// Docs: [`remoteControlAtStartup`](https://code.claude.com/docs/en/settings-reference#remotecontrolatstartup).
1930    #[serde(skip_serializing_if = "Option::is_none")]
1931    pub remote_control_at_startup: Option<bool>,
1932    /// Claude Code colors code by language in the diffs, code blocks, and file previews it
1933    /// shows in the terminal, with its built-in highlighter. Set this key to `true` to show
1934    /// them as plain text instead, for example if the colors clash with your terminal theme or
1935    /// slow a screen reader.
1936    ///
1937    /// - **Values**: Boolean
1938    ///   - `true`: Claude Code turns off syntax highlighting in diffs, code blocks, and file
1939    ///     previews
1940    ///   - `false`: Claude Code highlights syntax
1941    /// - **Default**: `false`
1942    /// - **Scope**: any settings file.
1943    ///
1944    /// Docs: [`syntaxHighlightingDisabled`](https://code.claude.com/docs/en/settings-reference#syntaxhighlightingdisabled).
1945    #[serde(skip_serializing_if = "Option::is_none")]
1946    pub syntax_highlighting_disabled: Option<bool>,
1947    /// By default, the transcript collapses each tool call to a short summary, such as the
1948    /// command Claude ran and a line count of its output, and you press `Ctrl+O` to switch the
1949    /// whole transcript to the expanded view when you want the details. Set this key to `true`
1950    /// to show every tool call's full input and output inline as it happens, which is useful
1951    /// when you're debugging a hook, an MCP server, or a long shell command. Appears in
1952    /// `/config` as **Verbose output**.
1953    ///
1954    /// - **Values**: Boolean
1955    ///   - `true`: you see full tool output
1956    ///   - `false`: you see truncated summaries of tool output
1957    /// - **Default**: `false`
1958    /// - **Scope**: any settings file. A value in `~/.claude.json` from an older version
1959    ///   applies when no settings file sets it.
1960    ///
1961    /// Docs: [`verbose`](https://code.claude.com/docs/en/settings-reference#verbose).
1962    #[serde(skip_serializing_if = "Option::is_none")]
1963    pub verbose: Option<bool>,
1964    /// Choose whether typing the keyword `ultracode` in a prompt triggers a [dynamic
1965    /// workflow](https://code.claude.com/docs/en/workflows#ask-for-a-workflow-in-your-prompt).
1966    /// Set it to `false` to type the word without triggering one.
1967    ///
1968    /// - **Values**: Boolean
1969    ///   - `true`: typing `ultracode` in a prompt triggers a dynamic workflow
1970    ///   - `false`: you can type the word without triggering one
1971    /// - **Default**: `true`
1972    /// - **Scope**: any settings file. Appears in `/config` as **Ultracode keyword trigger**.
1973    ///
1974    /// Docs: [`workflowKeywordTriggerEnabled`](https://code.claude.com/docs/en/settings-reference#workflowkeywordtriggerenabled).
1975    #[serde(skip_serializing_if = "Option::is_none")]
1976    pub workflow_keyword_trigger_enabled: Option<bool>,
1977    /// Let an unanswered [`AskUserQuestion`](https://code.claude.com/docs/en/tools-reference)
1978    /// dialog auto-continue after a period of idle time, submitting whatever options you had
1979    /// already selected. Set it when you step away and want Claude to continue without you.
1980    /// With the default, questions wait until you answer them.
1981    ///
1982    /// - **Values**: string, one of `"60s"`, `"5m"`, `"10m"`, or `"never"`
1983    /// - **Default**: `"never"`
1984    /// - **Scope**: user or managed.
1985    ///
1986    /// Docs: [`askUserQuestionTimeout`](https://code.claude.com/docs/en/settings-reference#askuserquestiontimeout).
1987    #[serde(skip_serializing_if = "Option::is_none")]
1988    pub ask_user_question_timeout: Option<DialogTimeout>,
1989    /// **Warning:** Removed in v2.1.234, together with its `/config` row **Default teammate
1990    /// model**. Setting it has no effect on current versions. Through v2.1.233, you set this
1991    /// key to the model for [agent
1992    /// team](https://code.claude.com/docs/en/agent-teams#specify-teammates-and-models)
1993    /// teammates your prompt didn't name a model for: an alias such as `"sonnet"`, or `null` to
1994    /// follow the lead's model. For the model Claude Code picks for such teammates now, see
1995    /// [specify teammates and
1996    /// models](https://code.claude.com/docs/en/agent-teams#specify-teammates-and-models).
1997    ///
1998    /// - **Values**: string, a model alias or full model ID, or `null`
1999    /// - **Default**: unset
2000    /// - **Scope**: global config. On v2.1.233 and earlier.
2001    ///
2002    /// Docs: [`teammateDefaultModel`](https://code.claude.com/docs/en/settings-reference#teammatedefaultmodel).
2003    #[serde(
2004        default,
2005        deserialize_with = "nullable",
2006        skip_serializing_if = "Option::is_none"
2007    )]
2008    pub teammate_default_model: Option<Option<String>>,
2009    /// Set the [agent count Claude aims
2010    /// for](https://code.claude.com/docs/en/workflows#set-a-size-guideline) in the dynamic
2011    /// workflows it writes. Claude Code sends the value to Claude as advice, not an enforced
2012    /// cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 10, and `"large"`
2013    /// fewer than 50. Choose `"small"` when you want to bound what a workflow spends.
2014    ///
2015    /// - **Values**: string, one of:
2016    ///   - `"unrestricted"`: no guideline, so Claude sizes the workflow to the task
2017    ///   - `"small"`: Claude aims for fewer than 5 agents
2018    ///   - `"medium"`: Claude aims for fewer than 10 agents
2019    ///   - `"large"`: Claude aims for fewer than 50 agents
2020    /// - **Default**: `"medium"`, or `"small"` when you're signed in on a Pro plan with Claude
2021    ///   Code v2.1.271 or later
2022    /// - **Scope**: any settings file. A value there takes precedence over the **Dynamic
2023    ///   workflow size** choice in `/config`, which Claude Code stores in `~/.claude.json`, and
2024    ///   Claude Code hides that row while a settings file sets the key.
2025    ///
2026    /// Docs: [`workflowSizeGuideline`](https://code.claude.com/docs/en/settings-reference#workflowsizeguideline).
2027    #[serde(skip_serializing_if = "Option::is_none")]
2028    pub workflow_size_guideline: Option<WorkflowSize>,
2029    /// Turn off the [Artifact](https://code.claude.com/docs/en/artifacts) tool, which publishes
2030    /// session output as a private web page on claude.ai. When you turn the **Artifacts** row
2031    /// off in `/config`, Claude Code writes this key to your user settings, so you don't
2032    /// usually edit it by hand.
2033    ///
2034    /// - **Values**: Boolean
2035    ///   - `false`: Claude Code turns the Artifact tool off for every session the file applies
2036    ///     to
2037    ///   - `true`: the same as leaving the key unset, because it never overrides a `false` from
2038    ///     another file, from
2039    ///     [`CLAUDE_CODE_DISABLE_ARTIFACT`](https://code.claude.com/docs/en/env-vars), or from
2040    ///     your organization's [admin
2041    ///     setting](https://code.claude.com/docs/en/artifacts#manage-artifacts-for-your-organization)
2042    /// - **Default**: unset, so the tool follows your account's
2043    ///   [availability](https://code.claude.com/docs/en/artifacts#availability)
2044    /// - **Scope**: any settings file. Every file can turn the tool off, and none can turn it
2045    ///   back on.
2046    ///
2047    /// Docs: [`enableArtifact`](https://code.claude.com/docs/en/settings-reference#enableartifact).
2048    #[serde(skip_serializing_if = "Option::is_none")]
2049    pub enable_artifact: Option<bool>,
2050    /// **Warning:** Removed in v2.1.257, together with the `Ctrl+E` command explanation on Bash
2051    /// and PowerShell permission prompts. Setting it has no effect on current versions. Through
2052    /// v2.1.256, you could press `Ctrl+E` on a Bash or PowerShell permission prompt to see a
2053    /// model-generated explanation of the command, and set this key to `false` to turn that
2054    /// shortcut off.
2055    ///
2056    /// - **Values**: Boolean
2057    /// - **Default**: `true`
2058    /// - **Scope**: global config. On v2.1.256 and earlier.
2059    ///
2060    /// Docs: [`permissionExplainerEnabled`](https://code.claude.com/docs/en/settings-reference#permissionexplainerenabled).
2061    #[serde(skip_serializing_if = "Option::is_none")]
2062    pub permission_explainer_enabled: Option<bool>,
2063    /// Choose where Claude Code shows the diff of an `Edit` or `Write` change it proposes when
2064    /// a [VS Code](https://code.claude.com/docs/en/vs-code) or
2065    /// [JetBrains](https://code.claude.com/docs/en/jetbrains#features) IDE is connected:
2066    /// `"auto"` opens it in the IDE's diff viewer, `"terminal"` keeps it in the terminal.
2067    /// Appears in `/config` as **Diff tool** only while Claude Code is connected to a VS Code
2068    /// or JetBrains IDE.
2069    ///
2070    /// - **Values**: string, one of:
2071    ///   - `"auto"`: Claude Code opens the diff in the IDE's diff viewer when a VS Code or
2072    ///     JetBrains IDE is connected
2073    ///   - `"terminal"`: Claude Code keeps the diff in the terminal
2074    /// - **Default**: `"auto"`
2075    /// - **Scope**: global config.
2076    ///
2077    /// Docs: [`diffTool`](https://code.claude.com/docs/en/settings-reference#difftool).
2078    #[serde(skip_serializing_if = "Option::is_none")]
2079    pub diff_tool: Option<DiffTool>,
2080    /// When you press `Ctrl+G`, Claude Code opens the prompt you're typing in your [external
2081    /// editor](https://code.claude.com/docs/en/interactive-mode#general-controls). With this
2082    /// key on, the editor buffer starts with Claude's previous response as `#` comment lines,
2083    /// so you can read it while you write, and Claude Code strips those lines when you save.
2084    /// Appears in `/config` as **Show last response in external editor**.
2085    ///
2086    /// - **Values**: Boolean
2087    ///   - `true`: the editor buffer starts with Claude's previous response as `#` comment
2088    ///     lines, which Claude Code strips when you save
2089    ///   - `false`: the editor buffer opens with only your prompt
2090    /// - **Default**: `false`
2091    /// - **Scope**: global config.
2092    ///
2093    /// Docs: [`externalEditorContext`](https://code.claude.com/docs/en/settings-reference#externaleditorcontext).
2094    #[serde(skip_serializing_if = "Option::is_none")]
2095    pub external_editor_context: Option<bool>,
2096    /// Connect to a running IDE automatically when you start Claude Code from an external
2097    /// terminal. Appears in `/config` as **Auto-connect to IDE (external terminal)** when you
2098    /// run Claude Code outside a VS Code or JetBrains terminal.
2099    ///
2100    /// - **Values**: Boolean
2101    ///   - `true`: Claude Code connects to a running IDE automatically when you start it from
2102    ///     an external terminal
2103    ///   - `false`: Claude Code doesn't connect automatically from an external terminal; inside
2104    ///     a VS Code or JetBrains terminal, or with `--ide`, it still connects
2105    /// - **Default**: `false`
2106    /// - **Scope**: global config.
2107    ///
2108    /// Docs: [`autoConnectIde`](https://code.claude.com/docs/en/settings-reference#autoconnectide).
2109    #[serde(skip_serializing_if = "Option::is_none")]
2110    pub auto_connect_ide: Option<bool>,
2111    /// Let [`/ide`](https://code.claude.com/docs/en/commands) install the Claude Code IDE
2112    /// extension in a running VS Code, Cursor, or Devin Desktop when you run the command from
2113    /// an external terminal. Claude Code doesn't install or update the extension when you start
2114    /// `claude`. Before v2.1.318, Claude Code installs or updates the extension when you start
2115    /// `claude` in one of those editors' terminals, unless this key is `false`.
2116    ///
2117    /// - **Values**: Boolean
2118    ///   - `true`: `/ide` installs the extension
2119    ///   - `false`: `/ide` doesn't install the extension
2120    /// - **Default**: `true`
2121    /// - **Scope**: global config.
2122    ///
2123    /// Docs: [`autoInstallIdeExtension`](https://code.claude.com/docs/en/settings-reference#autoinstallideextension).
2124    #[serde(skip_serializing_if = "Option::is_none")]
2125    pub auto_install_ide_extension: Option<bool>,
2126    /// Show emoji suggestions when you type `:` plus a shortcode in the prompt input, and
2127    /// replace a completed shortcode such as `:heart:` with its emoji. Set it to `false` to
2128    /// turn off both.
2129    ///
2130    /// - **Values**: Boolean
2131    ///   - `true`: Claude Code shows emoji suggestions after `:` and replaces a completed
2132    ///     shortcode with its emoji
2133    ///   - `false`: Claude Code neither suggests emoji nor replaces shortcodes
2134    /// - **Default**: `true`
2135    /// - **Scope**: any settings file.
2136    ///
2137    /// Docs: [`emojiCompletionEnabled`](https://code.claude.com/docs/en/settings-reference#emojicompletionenabled).
2138    #[serde(skip_serializing_if = "Option::is_none")]
2139    pub emoji_completion_enabled: Option<bool>,
2140    /// Map two-key INSERT-mode sequences to Escape in [vim editor
2141    /// mode](https://code.claude.com/docs/en/interactive-mode#vim-editor-mode). Each key is
2142    /// exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported
2143    /// target; Claude Code ignores other entries.
2144    ///
2145    /// - **Values**: object mapping a two-character sequence to `"<Esc>"`
2146    /// - **Default**: unset
2147    /// - **Scope**: user or managed. A repository can't remap your keystrokes.
2148    ///
2149    /// Docs: [`vimInsertModeRemaps`](https://code.claude.com/docs/en/settings-reference#viminsertmoderemaps).
2150    #[serde(skip_serializing_if = "Option::is_none")]
2151    pub vim_insert_mode_remaps: Option<BTreeMap<String, String>>,
2152    /// On macOS and Linux, place a corporate launcher command in front of the [background
2153    /// processes Claude Code
2154    /// starts](https://code.claude.com/docs/en/corporate-launcher#what-the-launcher-covers).
2155    /// Claude Code runs the launcher with its own command line appended, so the launcher must
2156    /// exec into Claude Code; see [Run Claude Code behind a corporate
2157    /// launcher](https://code.claude.com/docs/en/corporate-launcher) for the launcher contract.
2158    /// Requires Claude Code v2.1.210 or later.
2159    ///
2160    /// - **Values**: string, the launcher command as an argv prefix, such as an absolute path
2161    ///   with optional arguments
2162    /// - **Default**: unset, so background processes start unwrapped
2163    /// - **Scope**: user or managed.
2164    ///
2165    /// Docs: [`processWrapper`](https://code.claude.com/docs/en/settings-reference#processwrapper).
2166    #[serde(skip_serializing_if = "Option::is_none")]
2167    pub process_wrapper: Option<String>,
2168    /// Set the gateway URL the `/login` Cloud gateway screen connects to, so people reach your
2169    /// [cloud gateway](https://code.claude.com/docs/en/claude-apps-gateway) without typing its
2170    /// address. The screen has no URL field: with this key set, it shows your gateway URL and
2171    /// connects when the person presses Enter; without it, it tells them to contact their IT
2172    /// administrator. In managed settings, either this key or `forceLoginMethod: "gateway"`
2173    /// makes the machine gateway-only, except for sessions that select a cloud provider with
2174    /// `CLAUDE_CODE_USE_*`.
2175    ///
2176    /// - **Values**: string, a full URL including the scheme
2177    /// - **Default**: unset, so the Cloud gateway screen shows an error telling people to
2178    ///   contact their IT administrator
2179    /// - **Scope**: user or managed. Read from a managed source on the machine:
2180    ///   `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper.
2181    ///
2182    /// Docs: [`forceLoginGatewayUrl`](https://code.claude.com/docs/en/settings-reference#forcelogingatewayurl).
2183    #[serde(skip_serializing_if = "Option::is_none")]
2184    pub force_login_gateway_url: Option<String>,
2185    /// Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` CLI flags at
2186    /// startup, which users could otherwise pass to bypass
2187    /// [`strictKnownMarketplaces`](https://code.claude.com/docs/en/settings-reference#strictknownmarketplaces)
2188    /// for a single run. Claude Code exits with an error naming the rejected flags. In [cloud
2189    /// sessions](https://code.claude.com/docs/en/claude-code-on-the-web), Claude Code instead
2190    /// starts the session and drops every server-delivered `--mcp-config` entry except
2191    /// in-process `type: "sdk"` entries and a [Claude
2192    /// Tag](https://code.claude.com/docs/en/claude-tag) session's Slack tools.
2193    ///
2194    /// - **Values**: Boolean
2195    ///   - `true`: Claude Code rejects `--plugin-dir`, `--plugin-url`, `--agents`, and
2196    ///     `--mcp-config` at startup and exits with an error naming them. In cloud sessions, it
2197    ///     instead starts the session and drops every server-delivered `--mcp-config` entry
2198    ///     except in-process `type: "sdk"` entries and a Claude Tag session's Slack tools
2199    ///   - `false`: Claude Code accepts those flags
2200    /// - **Default**: `false`
2201    /// - **Scope**: managed.
2202    ///
2203    /// Docs: [`disableSideloadFlags`](https://code.claude.com/docs/en/settings-reference#disablesideloadflags).
2204    #[serde(skip_serializing_if = "Option::is_none")]
2205    pub disable_sideload_flags: Option<bool>,
2206    /// Stop Claude from using its tools to read or act on external pages in the desktop app's
2207    /// [Browser pane](https://code.claude.com/docs/en/desktop#browse-external-sites). People in
2208    /// your organization can still open external sites themselves, and local dev server
2209    /// previews keep working with Claude's tools. The desktop app reads this key; the terminal
2210    /// CLI ignores it.
2211    ///
2212    /// - **Values**: string, `"disabled"`; the desktop app also accepts `"disable"`, in either
2213    ///   case
2214    /// - **Default**: unset, so Claude's tools work on external pages
2215    /// - **Scope**: managed.
2216    ///
2217    /// Docs: [`browserExternalPageTools`](https://code.claude.com/docs/en/settings-reference#browserexternalpagetools).
2218    #[serde(skip_serializing_if = "Option::is_none")]
2219    pub browser_external_page_tools: Option<DisabledFlag>,
2220    /// Turn off external browsing in the desktop app's [Browser
2221    /// pane](https://code.claude.com/docs/en/desktop#browse-external-sites) for people and
2222    /// Claude alike. Localhost dev server previews keep working. HTML previews in SSH and WSL
2223    /// sessions still open, but they [don't run
2224    /// scripts](https://code.claude.com/docs/en/desktop#turn-off-scripts-in-ssh-and-wsl-previews-for-your-organization).
2225    ///
2226    /// - **Values**: Boolean; only the JSON Boolean `true` takes effect
2227    ///   - `true`: the desktop app turns off external browsing in the Browser pane for people
2228    ///     and Claude alike; localhost previews keep working
2229    ///   - `false`: external browsing stays on
2230    /// - **Default**: unset, so external browsing is on
2231    /// - **Scope**: managed.
2232    ///
2233    /// Docs: [`disableBrowserExternalNavigation`](https://code.claude.com/docs/en/settings-reference#disablebrowserexternalnavigation).
2234    #[serde(skip_serializing_if = "Option::is_none")]
2235    pub disable_browser_external_navigation: Option<bool>,
2236    /// Block Claude's tools for the desktop app's [iOS Simulator
2237    /// pane](https://code.claude.com/docs/en/desktop-ios-simulator#turn-off-simulator-access).
2238    /// People keep manual use of the pane; only Claude's access is removed, and nobody can turn
2239    /// it back on from inside the app. The desktop app reads this key; the terminal CLI ignores
2240    /// it.
2241    ///
2242    /// - **Values**: Boolean; only the JSON Boolean `true` takes effect
2243    ///   - `true`: the desktop app blocks Claude's tools for the iOS Simulator pane
2244    ///   - `false`: Claude's simulator tools follow each person's settings toggle in the
2245    ///     desktop app
2246    /// - **Default**: unset, so Claude's simulator tools follow each person's settings toggle
2247    ///   in the desktop app
2248    /// - **Scope**: managed.
2249    ///
2250    /// Docs: [`disableMobileSimulatorTools`](https://code.claude.com/docs/en/settings-reference#disablemobilesimulatortools).
2251    #[serde(skip_serializing_if = "Option::is_none")]
2252    pub disable_mobile_simulator_tools: Option<bool>,
2253    /// (Managed settings only) Run Claude's tools inside an isolated virtual machine instead of
2254    /// on your Mac. Disables the desktop app's iOS Simulator pane and Claude's simulator tools
2255    /// entirely, so the pane cannot attach a device while it is set.
2256    ///
2257    /// - **Values**: Boolean
2258    /// - **Default**: unset
2259    ///
2260    /// Docs: not in the settings reference; listed in the
2261    /// [JSON schema](https://json.schemastore.org/claude-code-settings.json).
2262    #[serde(skip_serializing_if = "Option::is_none")]
2263    pub require_cowork_full_vm_sandbox: Option<bool>,
2264    /// Let the built-in [Claude in Chrome](https://code.claude.com/docs/en/chrome) server run
2265    /// alongside a deployed `managed-mcp.json`. Without this key, a deployed `managed-mcp.json`
2266    /// blocks Claude in Chrome in terminal sessions. Requires Claude Code v2.1.282 or later.
2267    ///
2268    /// - **Values**: Boolean
2269    ///   - `true`: the built-in Claude in Chrome server can run alongside a deployed
2270    ///     `managed-mcp.json`
2271    ///   - `false`: a deployed `managed-mcp.json` blocks Claude in Chrome in terminal sessions
2272    /// - **Default**: `false`, so a deployed `managed-mcp.json` blocks Claude in Chrome in
2273    ///   terminal sessions
2274    /// - **Scope**: managed, from the device's own managed settings only: an MDM-deployed plist
2275    ///   or HKLM registry key, or a system `managed-settings.json` file. Claude Code ignores it
2276    ///   in server-managed settings, in the user-writable HKCU registry, and in user or project
2277    ///   settings.
2278    ///
2279    /// Docs: [`allowClaudeInChromeWithManagedMcp`](https://code.claude.com/docs/en/settings-reference#allowclaudeinchromewithmanagedmcp).
2280    #[serde(skip_serializing_if = "Option::is_none")]
2281    pub allow_claude_in_chrome_with_managed_mcp: Option<bool>,
2282    /// List the services a machine may reach Claude through, such as the Anthropic API, Amazon
2283    /// Bedrock, or an LLM gateway. A session on a provider that isn't listed is refused at
2284    /// startup, at login, and when it next contacts the API, so switching to an unlisted
2285    /// provider mid-session is refused too. The [refusal
2286    /// message](https://code.claude.com/docs/en/errors#managed-settings-dont-allow-this-api-provider)
2287    /// names what selected the provider and the steps to continue.
2288    ///
2289    /// - **Values**: array of strings, each one of:
2290    ///   - `"anthropic"`: the Anthropic API on Anthropic's own host, through a claude.ai or
2291    ///     Console sign-in or an API key. Pair it with
2292    ///     [`forceLoginMethod`](https://code.claude.com/docs/en/settings-reference#forceloginmethod)
2293    ///     or
2294    ///     [`forceLoginOrgUUID`](https://code.claude.com/docs/en/settings-reference#forceloginorguuid)
2295    ///     to also restrict the sign-in
2296    ///   - `"bedrock"`: [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock)
2297    ///   - `"vertex"`: [Google Cloud's Agent
2298    ///     Platform](https://code.claude.com/docs/en/google-vertex-ai), formerly Vertex AI
2299    ///   - `"foundry"`: [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry)
2300    ///   - `"anthropicAws"`: [Claude Platform on
2301    ///     AWS](https://code.claude.com/docs/en/claude-platform-on-aws)
2302    ///   - `"mantle"`: the Amazon Bedrock [Mantle
2303    ///     endpoint](https://code.claude.com/docs/en/amazon-bedrock#use-the-mantle-endpoint). A
2304    ///     session that [runs Mantle alongside the Invoke
2305    ///     API](https://code.claude.com/docs/en/amazon-bedrock#run-mantle-alongside-the-invoke-api)
2306    ///     uses both providers, so list `"bedrock"` and `"mantle"` together for it
2307    ///   - `"customEndpoint"`: the Anthropic API or a cloud provider's API sent to another
2308    ///     host, such as an [LLM gateway](https://code.claude.com/docs/en/llm-gateway) named by
2309    ///     `ANTHROPIC_BASE_URL` or by a provider's endpoint variable such as
2310    ///     `ANTHROPIC_BEDROCK_BASE_URL`. Claude Code admits it only for the exact value a
2311    ///     managed [`env`](https://code.claude.com/docs/en/settings-reference#env) block pins
2312    ///   - `"gateway"`: a [Cloud gateway](https://code.claude.com/docs/en/claude-apps-gateway)
2313    ///     sign-in
2314    /// - **Default**: unset, so any provider can be used
2315    /// - **Scope**: managed. A list that the machine's own admin sources set, MDM policies and
2316    ///   managed settings files, keeps applying when server-managed settings also deliver one:
2317    ///   a session may then use only the providers on both lists, so a server-managed list can
2318    ///   narrow what the machine allows but never widen it.
2319    ///
2320    /// Docs: [`allowedProviders`](https://code.claude.com/docs/en/settings-reference#allowedproviders).
2321    #[serde(skip_serializing_if = "Option::is_none")]
2322    pub allowed_providers: Option<Vec<Provider>>,
2323    /// List the managed plugins whose
2324    /// [mods](https://code.claude.com/docs/en/plugins/mods/overview) run after every mod a user
2325    /// installs, in the listed order. An id listed in both `prependPlugins` and `appendPlugins`
2326    /// is prepended. In managed settings, Claude Code skips an id whose plugin doesn't [count
2327    /// as your
2328    /// organization's](https://code.claude.com/docs/en/plugins/mods/admin#install-your-organizations-mods).
2329    ///
2330    /// - **Values**: array of `plugin-name@marketplace-name` strings
2331    /// - **Default**: unset
2332    /// - **Scope**: user or managed. Claude Code reads the key from managed settings.
2333    ///
2334    /// Docs: [`appendPlugins`](https://code.claude.com/docs/en/settings-reference#appendplugins).
2335    #[serde(skip_serializing_if = "Option::is_none")]
2336    pub append_plugins: Option<Vec<String>>,
2337    /// Set how full the context window gets before Claude Code [compacts
2338    /// automatically](https://code.claude.com/docs/en/context-window#when-your-context-fills-up).
2339    ///
2340    /// - **Values**: number of tokens, from `100000` to `1000000`. Claude Code caps the value
2341    ///   at your model's context window; the [models
2342    ///   overview](https://platform.claude.com/docs/en/about-claude/models/overview) lists each
2343    ///   model's window
2344    /// - **Default**: unset, so Claude Code picks a window tuned for your model
2345    /// - **Scope**: any settings file.
2346    ///
2347    /// Docs: [`autoCompactWindow`](https://code.claude.com/docs/en/settings-reference#autocompactwindow).
2348    #[serde(skip_serializing_if = "Option::is_none")]
2349    pub auto_compact_window: Option<u64>,
2350    /// After a claude.ai usage limit stops your session, wait in the open session and continue
2351    /// the task automatically after the reset. See [Turn automatic continue
2352    /// off](https://code.claude.com/docs/en/interactive-mode#turn-automatic-continue-off).
2353    /// Requires Claude Code v2.1.234 or later.
2354    ///
2355    /// - **Values**: Boolean
2356    ///   - `true`: after a claude.ai usage limit stops your session, Claude Code waits in the
2357    ///     open session and continues the task automatically after the reset
2358    ///   - `false`: Claude Code doesn't start the wait on its own. You can still [start a wait
2359    ///     yourself](https://code.claude.com/docs/en/interactive-mode#start-a-wait-yourself)
2360    ///     from the usage-limit options menu
2361    /// - **Default**: `true`
2362    /// - **Scope**: user or managed. Read from user settings, `--settings`, and managed
2363    ///   settings only.
2364    ///
2365    /// Docs: [`autoContinueAtUsageLimit`](https://code.claude.com/docs/en/settings-reference#autocontinueatusagelimit).
2366    #[serde(skip_serializing_if = "Option::is_none")]
2367    pub auto_continue_at_usage_limit: Option<bool>,
2368    /// Choose how
2369    /// [`availableModels`](https://code.claude.com/docs/en/settings-reference#availablemodels)
2370    /// entries match model IDs. By default a model ID entry also permits later versions that
2371    /// extend it, so `"claude-opus-5"` permits Opus 5.5. With `"exact"`, each model ID entry
2372    /// permits only the version it names, so a newer version of that model stays blocked until
2373    /// you list it.
2374    ///
2375    /// - **Values**: string, one of:
2376    ///   - `"prefix"`: a model ID entry permits its version and any model ID that extends it
2377    ///     with another segment
2378    ///   - `"exact"`: a model ID entry permits only the version it names, so `"claude-opus-5"`
2379    ///     permits Opus 5 but not `claude-opus-5-5`. An entry such as `"claude-opus-4-5"` also
2380    ///     permits its dated Anthropic model ID `claude-opus-4-5-20251101`. A family alias such
2381    ///     as `"opus"` still permits the whole family, and `best`, `opusplan`, and `default`
2382    ///     entries are ignored
2383    /// - **Default**: `"prefix"`
2384    /// - **Scope**: managed. Claude Code ignores the key in user, project, and local settings
2385    ///   and in `--settings`, with a warning.
2386    ///
2387    /// Docs: [`availableModelsMatch`](https://code.claude.com/docs/en/settings-reference#availablemodelsmatch).
2388    #[serde(skip_serializing_if = "Option::is_none")]
2389    pub available_models_match: Option<ModelMatch>,
2390    /// Choose whether Claude Code records which files changed in a Git repository while a Bash
2391    /// command runs. When it records them, you see their diff in the terminal after the
2392    /// command, and your [PostToolUse Bash hooks](https://code.claude.com/docs/en/hooks#bash)
2393    /// receive the changed-file list. A listed file isn't always one the command changed.
2394    ///
2395    /// - **Values**: Boolean
2396    /// - **Default**: unset, so Claude Code records changes in auto mode and
2397    ///   `bypassPermissions` mode when it directs Claude to edit files through Bash
2398    /// - **Scope**: user or managed. A `true` counts only from your user settings, JSON passed
2399    ///   with `--settings`, or [managed
2400    ///   settings](https://code.claude.com/docs/en/managed-settings), so a `true` in a
2401    ///   repository's `.claude/settings.json` or `.claude/settings.local.json` can't turn the
2402    ///   recording on.
2403    ///
2404    /// Docs: [`bashEditDiffEnabled`](https://code.claude.com/docs/en/settings-reference#basheditdiffenabled).
2405    #[serde(skip_serializing_if = "Option::is_none")]
2406    pub bash_edit_diff_enabled: Option<bool>,
2407    /// Set how many characters of a successful Bash or PowerShell command's [output Claude
2408    /// receives inline](https://code.claude.com/docs/en/tools-reference#output-limits). When
2409    /// output passes the limit, Claude Code saves it to a file and Claude receives a short
2410    /// preview plus the file's path. Raise the limit when command output, such as a verbose
2411    /// build or a full test-suite log, routinely overflows the default and you want Claude to
2412    /// read it without opening the file.
2413    ///
2414    /// - **Values**: number of characters, a positive integer. Claude Code clamps the value
2415    ///   into the range `4000` to `128000`
2416    /// - **Default**: unset, so Claude receives up to 30,000 characters inline
2417    /// - **Scope**: any settings file.
2418    ///
2419    /// Docs: [`bashOutputMaxChars`](https://code.claude.com/docs/en/settings-reference#bashoutputmaxchars).
2420    #[serde(skip_serializing_if = "Option::is_none")]
2421    pub bash_output_max_chars: Option<u64>,
2422    /// Choose what this session does with [messages arriving from your other Claude Code
2423    /// sessions](https://code.claude.com/docs/en/cross-session-messaging#control-inbound-messages).
2424    /// When no value applies, Claude Code decides per message from the two sessions'
2425    /// permission-mode classes.
2426    ///
2427    /// - **Values**: string, one of:
2428    ///   - `"accept"`: Claude Code delivers the message to Claude
2429    ///   - `"hold"`: Claude Code shows a notice for the message without delivering it
2430    ///   - `"refuse"`: Claude Code drops the message
2431    /// - **Default**: unset, so Claude Code decides per message
2432    /// - **Scope**: any settings file. A project or local value applies only when it's stricter
2433    ///   than the value managed settings, the `--settings` flag, or user settings give.
2434    ///
2435    /// Docs: [`crossSessionInbound`](https://code.claude.com/docs/en/settings-reference#crosssessioninbound).
2436    #[serde(skip_serializing_if = "Option::is_none")]
2437    pub cross_session_inbound: Option<InboundMode>,
2438    /// Block specific models, with or without an
2439    /// [`availableModels`](https://code.claude.com/docs/en/settings-reference#availablemodels)
2440    /// allowlist and even when that list permits them. Claude Code hides a blocked model from
2441    /// the `/model` picker, and the model can't be selected anywhere `availableModels` is
2442    /// enforced. A session on the Default option doesn't run a blocked model either, as [Block
2443    /// specific models or
2444    /// versions](https://code.claude.com/docs/en/model-config#block-specific-models-or-versions)
2445    /// describes.
2446    ///
2447    /// - **Values**: array of model aliases or IDs
2448    ///   - A family alias such as `"opus"` blocks every model in that family
2449    ///   - A model ID such as `"claude-opus-5-5"` blocks that version in every spelling,
2450    ///     including dated and provider-specific IDs
2451    ///   - A model ID with no minor version, such as `"claude-opus-5"`, also blocks later minor
2452    ///     versions such as Opus 5.5. Write `"claude-opus-5-0"` to block Opus 5 alone
2453    ///   - `best`, `opusplan`, and `default` entries are ignored
2454    /// - **Default**: unset, so no model is blocked
2455    /// - **Scope**: managed. Claude Code ignores the key in user, project, and local settings
2456    ///   and in `--settings`, with a warning.
2457    ///
2458    /// Docs: [`deniedModels`](https://code.claude.com/docs/en/settings-reference#deniedmodels).
2459    #[serde(skip_serializing_if = "Option::is_none")]
2460    pub denied_models: Option<Vec<String>>,
2461    /// Set an age limit in days for the transcripts of sessions you started or most recently
2462    /// continued in Claude Desktop or Cowork. Without this key, Claude Code [keeps those
2463    /// transcripts at any
2464    /// age](https://code.claude.com/docs/en/claude-directory#cleaned-up-automatically), except
2465    /// in cases such as a session you deleted in Claude Desktop. Requires Claude Code v2.1.248
2466    /// or later.
2467    ///
2468    /// - **Values**: number of days, a whole number, minimum `0`
2469    /// - **Default**: `0`, which sets no age limit
2470    /// - **Scope**: user or managed. Claude Code also reads the key from a file you pass with
2471    ///   `--settings`, and ignores it in project and local settings.
2472    ///
2473    /// Docs: [`desktopSessionCleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#desktopsessioncleanupperioddays).
2474    #[serde(skip_serializing_if = "Option::is_none")]
2475    pub desktop_session_cleanup_period_days: Option<u64>,
2476    /// Set the deadline for dialogs Claude Code [forwards to a remote
2477    /// client](https://code.claude.com/docs/en/remote-control#limitations), such as a Remote
2478    /// Control or SDK host, and for the approval dialog for a [held cross-session
2479    /// message](https://code.claude.com/docs/en/cross-session-messaging#control-inbound-messages).
2480    /// On Claude Code v2.1.236 or later, the same deadline bounds the mid-session [Fable
2481    /// usage-credits consent
2482    /// prompt](https://code.claude.com/docs/en/model-config#fable-and-usage-credits) in a
2483    /// session that may have nobody at the terminal. When no answer arrives before the
2484    /// deadline, Claude Code cancels the dialog and continues with its no-action default.
2485    ///
2486    /// - **Values**: string, one of `"60s"`, `"5m"`, `"10m"`, or `"never"`, which disables the
2487    ///   deadline
2488    /// - **Default**: `"5m"`
2489    /// - **Scope**: user or managed.
2490    ///
2491    /// Docs: [`dialogExpiry`](https://code.claude.com/docs/en/settings-reference#dialogexpiry).
2492    #[serde(skip_serializing_if = "Option::is_none")]
2493    pub dialog_expiry: Option<DialogTimeout>,
2494    /// Block the [`command` plugin
2495    /// source](https://code.claude.com/docs/en/plugins/marketplace-reference#command-plugin-source),
2496    /// which installs a plugin by running a marketplace-declared command on the user's machine.
2497    /// When you set it to `true`, Claude Code never runs the command, doesn't install or update
2498    /// command-sourced plugins, and stops loading the ones already installed. Set it to `false`
2499    /// to allow them explicitly.
2500    ///
2501    /// - **Values**: Boolean
2502    ///   - `true`: Claude Code never runs the marketplace-declared command, doesn't install or
2503    ///     update command-sourced plugins, and stops loading the ones already installed
2504    ///   - `false`: Claude Code allows command-sourced plugins explicitly
2505    /// - **Default**: unset, so Claude Code follows
2506    ///   [`allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedhooksonly):
2507    ///   an organization that restricts hook execution to managed settings gets command sources
2508    ///   disabled too. An application that passes [`disableAllHooks:
2509    ///   true`](https://code.claude.com/docs/en/settings-reference#disableallhooks) in the
2510    ///   Agent SDK's `managedSettings` option doesn't by itself disable command sources.
2511    /// - **Scope**: managed.
2512    ///
2513    /// Docs: [`disableCommandPluginSources`](https://code.claude.com/docs/en/settings-reference#disablecommandpluginsources).
2514    #[serde(skip_serializing_if = "Option::is_none")]
2515    pub disable_command_plugin_sources: Option<bool>,
2516    /// Turn off Code sessions that run on the device in the [desktop
2517    /// app](https://code.claude.com/docs/en/desktop#local-sessions-on-managed-devices), for
2518    /// deployments where developers should work on remote machines over SSH. With the key set
2519    /// to `true`, users see this in the Code tab:
2520    ///
2521    /// - **Values**: Boolean; only the JSON Boolean `true` takes effect
2522    ///   - `true`: the desktop app offers no on-device Code sessions; existing local sessions
2523    ///     stay listed but can't continue
2524    ///   - `false`: local sessions stay available
2525    /// - **Default**: unset, so local sessions are available
2526    /// - **Scope**: managed. By default, the desktop app reads the key from [one managed
2527    ///   source](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources).
2528    ///
2529    /// Docs: [`disableDesktopLocalSessions`](https://code.claude.com/docs/en/settings-reference#disabledesktoplocalsessions).
2530    #[serde(skip_serializing_if = "Option::is_none")]
2531    pub disable_desktop_local_sessions: Option<bool>,
2532    /// Keep scripts from running when people [preview an HTML
2533    /// file](https://code.claude.com/docs/en/desktop#preview-html-files-in-ssh-and-wsl-sessions)
2534    /// from an SSH or WSL session in the desktop app. External browsing in the Browser pane is
2535    /// unaffected. The desktop app reads this key; the terminal CLI ignores it.
2536    ///
2537    /// - **Values**: Boolean; only the JSON Boolean `true` takes effect
2538    ///   - `true`: HTML previews in SSH and WSL sessions don't run scripts
2539    ///   - `false`: the key doesn't turn scripts off
2540    /// - **Default**: unset, so the key has no effect
2541    /// - **Scope**: managed. The desktop app doesn't read the key from the remote machine or
2542    ///   the WSL distribution.
2543    ///
2544    /// Docs: [`disableRemotePreviewScripts`](https://code.claude.com/docs/en/settings-reference#disableremotepreviewscripts).
2545    #[serde(skip_serializing_if = "Option::is_none")]
2546    pub disable_remote_preview_scripts: Option<bool>,
2547    /// Turn [dynamic workflows](https://code.claude.com/docs/en/workflows) on or off for
2548    /// yourself when your plan's default isn't what you want. Appears in `/config` as **Dynamic
2549    /// workflows**, which writes this key to your user settings and removes it again when you
2550    /// toggle back to your plan's default. To turn workflows off for everyone from managed
2551    /// settings, use
2552    /// [`disableWorkflows`](https://code.claude.com/docs/en/settings-reference#disableworkflows)
2553    /// instead.
2554    ///
2555    /// - **Values**: Boolean
2556    ///   - `true`: Claude Code turns dynamic workflows on for you
2557    ///   - `false`: Claude Code turns dynamic workflows off for you
2558    /// - **Default**: unset, so workflows are on unless you're on the Pro plan, where they're
2559    ///   off
2560    /// - **Scope**: any settings file.
2561    ///
2562    /// Docs: [`enableWorkflows`](https://code.claude.com/docs/en/settings-reference#enableworkflows).
2563    #[serde(skip_serializing_if = "Option::is_none")]
2564    pub enable_workflows: Option<bool>,
2565    /// Control [Claude-drafted
2566    /// feedback](https://code.claude.com/docs/en/tools-reference#sendfeedback-tool-behavior):
2567    /// whether Claude can queue feedback drafts for you to review, and whether Claude Code
2568    /// shows a card when Claude queues one.
2569    ///
2570    /// - **Values**: string, one of `"notify"`, `"quiet"`, or `"off"`
2571    ///   - `"notify"`: Claude Code shows a card above the prompt when Claude queues a draft, up
2572    ///     to [three cards in a
2573    ///     session](https://code.claude.com/docs/en/tools-reference#what-you-see-when-claude-drafts)
2574    ///     by default
2575    ///   - `"quiet"`: Claude drafts without a card. You see the count of queued drafts in the
2576    ///     prompt footer and review them in `/feedback`
2577    ///   - `"off"`: Claude Code removes the SendFeedback tool, so Claude can't queue drafts
2578    /// - **Default**: `"notify"`
2579    /// - **Scope**: user or managed.
2580    ///
2581    /// Docs: [`feedbackDrafts`](https://code.claude.com/docs/en/settings-reference#feedbackdrafts).
2582    #[serde(skip_serializing_if = "Option::is_none")]
2583    pub feedback_drafts: Option<FeedbackDrafts>,
2584    /// Declare the public IPv4 blocks that your organization numbers its internal network from,
2585    /// so `/login` accepts a [cloud
2586    /// gateway](https://code.claude.com/docs/en/claude-apps-gateway) there. Requires Claude
2587    /// Code v2.1.268 or later. Without this key, `/login` connects to any gateway on a private
2588    /// address and nothing else.
2589    ///
2590    /// - **Values**: array of strings, at most four IPv4 CIDR blocks, each `/8` to `/32`, not
2591    ///   overlapping one another, and none overlapping private space.
2592    /// - **Default**: unset, so `/login` accepts only gateways on private addresses
2593    /// - **Scope**: managed. Read only from a source on the machine: `managed-settings.json`,
2594    ///   the macOS plist or Windows HKLM registry, or a policy helper.
2595    ///
2596    /// Docs: [`gatewayInternalNetworks`](https://code.claude.com/docs/en/settings-reference#gatewayinternalnetworks).
2597    #[serde(skip_serializing_if = "Option::is_none")]
2598    pub gateway_internal_networks: Option<Vec<String>>,
2599    /// Idle compaction
2600    /// [compacts](https://code.claude.com/docs/en/context-window#what-survives-compaction) a
2601    /// long conversation that you've stepped away from. Your next message then sends a summary
2602    /// instead of the whole conversation. Once compacted, the conversation shows a notice:
2603    ///
2604    /// - **Values**: Boolean
2605    ///   - `true`: Claude Code compacts idle conversations that meet the conditions
2606    ///   - `false`: Claude Code doesn't compact while your session is idle
2607    /// - **Default**: `true`
2608    /// - **Scope**: any settings file.
2609    ///
2610    /// Docs: [`idleCompaction`](https://code.claude.com/docs/en/settings-reference#idlecompaction).
2611    #[serde(skip_serializing_if = "Option::is_none")]
2612    pub idle_compaction: Option<bool>,
2613    /// Require your explicit approval before Claude's `SendMessage` reaches one of your
2614    /// sessions beyond this machine; see [Require approval for cross-machine
2615    /// messages](https://code.claude.com/docs/en/cross-session-messaging#require-approval-for-cross-machine-messages).
2616    /// The approval prompt appears even in [`bypassPermissions`
2617    /// mode](https://code.claude.com/docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode).
2618    ///
2619    /// - **Values**: Boolean
2620    ///   - `true`: Claude Code asks for your approval before Claude's `SendMessage` reaches one
2621    ///     of your sessions beyond this machine
2622    ///   - `false`: cross-machine messages don't prompt
2623    /// - **Default**: unset, so cross-machine messages don't prompt
2624    /// - **Scope**: any settings file. A `true` from any scope applies, so a checked-in project
2625    ///   file can turn the requirement on but not off.
2626    ///
2627    /// Docs: [`isolatePeerMachines`](https://code.claude.com/docs/en/settings-reference#isolatepeermachines).
2628    #[serde(skip_serializing_if = "Option::is_none")]
2629    pub isolate_peer_machines: Option<bool>,
2630    /// **Warning:** Deprecated since v2.1.261 and has no effect. The prompt's word-editing keys
2631    /// always [follow readline
2632    /// conventions](https://code.claude.com/docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace),
2633    /// as in Bash. Claude Code still accepts `keybindingFlavor`, so a settings file that sets
2634    /// it stays valid.
2635    ///
2636    /// - **Values**: string, `"classic"` or `"readline"`
2637    /// - **Default**: unset
2638    /// - **Scope**: any settings file.
2639    ///
2640    /// Docs: [`keybindingFlavor`](https://code.claude.com/docs/en/settings-reference#keybindingflavor).
2641    #[serde(skip_serializing_if = "Option::is_none")]
2642    pub keybinding_flavor: Option<KeybindingFlavor>,
2643    /// Choose whether Claude Code applies only the highest-priority [managed
2644    /// source](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources)
2645    /// your organization delivers, or combines every admin source it delivers. By default
2646    /// Claude Code takes the highest-priority source that carries a [policy
2647    /// key](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources)
2648    /// and ignores the rest. A policy key is any settings key other than this one and
2649    /// `wslInheritsWindowsSettings`.
2650    ///
2651    /// - **Values**: string, one of:
2652    ///   - `"first-wins"`: the highest-priority source that carries a policy key supplies the
2653    ///     policy, and lower sources contribute only the [keys Claude Code reads from every
2654    ///     admin
2655    ///     source](https://code.claude.com/docs/en/managed-settings#keys-read-from-every-admin-source)
2656    ///   - `"merge"`: every admin source you deliver contributes its keys, combined by the
2657    ///     rules below
2658    /// - **Default**: `"first-wins"`
2659    /// - **Scope**: managed. Claude Code reads this key from the highest-priority source that
2660    ///   carries either this key or a policy key, and ignores this key in every source ranked
2661    ///   lower, so a lower source can't opt itself into combining with the source above it.
2662    ///
2663    /// Docs: [`managedSourcesBehavior`](https://code.claude.com/docs/en/settings-reference#managedsourcesbehavior).
2664    #[serde(skip_serializing_if = "Option::is_none")]
2665    pub managed_sources_behavior: Option<SourcesBehavior>,
2666    /// Cap the [effort level](https://code.claude.com/docs/en/model-config#adjust-effort-level)
2667    /// a session can use, leaving lower levels available. Any higher level runs at the cap
2668    /// instead, including one from `/effort`, the `/model` picker, `--effort`,
2669    /// [`CLAUDE_CODE_EFFORT_LEVEL`](https://code.claude.com/docs/en/env-vars), a skill's or
2670    /// subagent's `effort` frontmatter, or the model's own default. Claude Code applies the cap
2671    /// itself before each request, so it holds on every provider, including Amazon Bedrock,
2672    /// Google Cloud's Agent Platform, and Microsoft Foundry.
2673    ///
2674    /// - **Values**: string, one of `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"`. A
2675    ///   `"max"` value sets no cap
2676    /// - **Default**: unset, so no cap applies
2677    /// - **Scope**: any settings file. Deploy it in managed settings to enforce it for an
2678    ///   organization.
2679    ///
2680    /// Docs: [`maxEffortLevel`](https://code.claude.com/docs/en/settings-reference#maxeffortlevel).
2681    #[serde(skip_serializing_if = "Option::is_none")]
2682    pub max_effort_level: Option<EffortLevel>,
2683    /// Cap the width of the prose in Claude's responses so lines stay readable in a wide
2684    /// terminal. Paragraphs, headings, lists, and blockquotes wrap within this many columns,
2685    /// while tables and code blocks keep the full terminal width. Requires Claude Code v2.1.282
2686    /// or later.
2687    ///
2688    /// - **Values**: number of terminal columns, a whole number, minimum `40`. Claude Code
2689    ///   ignores any other value
2690    /// - **Default**: unset, so prose wraps at the terminal edge
2691    /// - **Scope**: any settings file.
2692    ///
2693    /// Docs: [`maxProseWidth`](https://code.claude.com/docs/en/settings-reference#maxprosewidth).
2694    #[serde(skip_serializing_if = "Option::is_none")]
2695    pub max_prose_width: Option<u64>,
2696    /// List the models the `/model` picker offers, in the order you write them and under labels
2697    /// you choose, so the picker lists the models your organization runs, after the built-in
2698    /// lineup or instead of it. Each row's `model` is taken verbatim, so it accepts anything
2699    /// `--model` accepts: an alias such as `opus`, an Anthropic model ID, or a provider-format
2700    /// ID for Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or an LLM
2701    /// gateway. Requires Claude Code v2.1.242 or later.
2702    ///
2703    /// - **Values**: object with an `options` array of rows and an optional
2704    ///   `replaceBuiltInOptions` Boolean
2705    /// - **Default**: unset, so the picker shows the built-in lineup
2706    /// - **Scope**: user or managed. Claude Code reads the key from managed settings,
2707    ///   `--settings`, and user settings, and ignores it in project and local settings so a
2708    ///   repository you clone can't relabel the picker.
2709    ///
2710    /// Docs: [`modelPicker`](https://code.claude.com/docs/en/settings-reference#modelpicker).
2711    #[serde(skip_serializing_if = "Option::is_none")]
2712    pub model_picker: Option<ModelPicker>,
2713    /// Report spend at the rates your organization pays instead of list price. Set it when your
2714    /// organization has contracted rates, so the dollar figures developers see match your bill.
2715    /// Claude Code applies the rates in `/usage`, the [status
2716    /// line](https://code.claude.com/docs/en/statusline), the Agent SDK's `total_cost_usd`, the
2717    /// [`--max-budget-usd`](https://code.claude.com/docs/en/cli-reference) limit, and the
2718    /// [OpenTelemetry](https://code.claude.com/docs/en/monitoring-usage) cost metric and
2719    /// events.
2720    ///
2721    /// - **Values**: object with an optional `multiplier` and an optional `overrides` map
2722    /// - **Default**: unset, so Claude Code reports list price unless a host application
2723    ///   supplies a table
2724    /// - **Scope**: managed. Deploy the key through server-managed settings, an MDM policy, a
2725    ///   `managed-settings.json` file, or a [policy
2726    ///   helper](https://code.claude.com/docs/en/managed-settings#compute-the-policy-with-a-helper-program).
2727    ///
2728    /// Docs: [`modelPricing`](https://code.claude.com/docs/en/settings-reference#modelpricing).
2729    #[serde(skip_serializing_if = "Option::is_none")]
2730    pub model_pricing: Option<ModelPricing>,
2731    /// Save an [effort level](https://code.claude.com/docs/en/model-config#adjust-effort-level)
2732    /// for each model you use. Requires Claude Code v2.1.251 or later. In an interactive
2733    /// session on your machine, when you save `low`, `medium`, `high`, or `xhigh` as your
2734    /// default with `/effort` or the `/model` picker's effort slider, Claude Code writes that
2735    /// level here under the model you're using, so you rarely edit this key yourself.
2736    ///
2737    /// - **Values**: object mapping a model name to an object with any of these fields:
2738    ///   - `effortLevel`: one of `"low"`, `"medium"`, `"high"`, or `"xhigh"`
2739    ///   - [`maxEffortLevel`](https://code.claude.com/docs/en/settings-reference#maxeffortlevel):
2740    ///     the highest effort level the model may run at
2741    ///   - `autoCompactWindow`: a number of tokens from `100000` to `1000000`, or `"auto"` for
2742    ///     the window tuned for the model.
2743    ///     [`/autocompact`](https://code.claude.com/docs/en/model-config#set-the-auto-compact-window)
2744    ///     saves here. For that model, the value takes precedence over a top-level
2745    ///     [`autoCompactWindow`](https://code.claude.com/docs/en/settings-reference#autocompactwindow)
2746    ///     in the same settings file. Requires Claude Code v2.1.288 or later
2747    /// - **Default**: unset
2748    /// - **Scope**: any settings file.
2749    ///
2750    /// Docs: [`modelSettings`](https://code.claude.com/docs/en/settings-reference#modelsettings).
2751    #[serde(skip_serializing_if = "Option::is_none")]
2752    pub model_settings: Option<BTreeMap<String, ModelSettings>>,
2753    /// List the managed plugins whose
2754    /// [mods](https://code.claude.com/docs/en/plugins/mods/overview) run before every mod a
2755    /// user installs, in the listed order. When you set this key in managed settings, name
2756    /// `sec-default@builtin` in the list to keep the built-in guard. In managed settings,
2757    /// Claude Code skips an id whose plugin doesn't count as your organization's.
2758    ///
2759    /// - **Values**: array of `plugin-name@marketplace-name` strings
2760    /// - **Default**: unset
2761    /// - **Scope**: user or managed. Claude Code reads the key from managed settings.
2762    ///
2763    /// Docs: [`prependPlugins`](https://code.claude.com/docs/en/settings-reference#prependplugins).
2764    #[serde(skip_serializing_if = "Option::is_none")]
2765    pub prepend_plugins: Option<Vec<String>>,
2766    /// Choose how long the [prompt cache](https://code.claude.com/docs/en/prompt-caching) holds
2767    /// the main conversation. This key applies to your interactive, `-p`, and Agent SDK turns,
2768    /// together with the helpers Claude Code runs inline with them. The one-hour lifetime keeps
2769    /// the cache warm across longer breaks, and the API [bills each cache write at a higher
2770    /// rate](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing) than
2771    /// at the five-minute lifetime.
2772    ///
2773    /// - **Values**: string, one of:
2774    ///   - `"5m"`: the cache holds for five minutes
2775    ///   - `"1h"`: the cache holds for an hour
2776    /// - **Default**: unset, so each main-conversation request gets [its default
2777    ///   lifetime](https://code.claude.com/docs/en/prompt-caching#which-ttl-each-request-gets)
2778    /// - **Scope**: any settings file.
2779    ///
2780    /// Docs: [`promptCacheTtl`](https://code.claude.com/docs/en/settings-reference#promptcachettl).
2781    #[serde(skip_serializing_if = "Option::is_none")]
2782    pub prompt_cache_ttl: Option<CacheTtl>,
2783    /// Show or hide [prompt
2784    /// suggestions](https://code.claude.com/docs/en/interactive-mode#prompt-suggestions), the
2785    /// grayed-out predictions that appear in your prompt input. Set it to `false`, or turn off
2786    /// **Prompt suggestions** in `/config`, to hide them.
2787    ///
2788    /// - **Values**: Boolean
2789    ///   - `true`: you see prompt suggestions in your prompt input
2790    ///   - `false`: Claude Code hides prompt suggestions
2791    /// - **Default**: `true`
2792    /// - **Scope**: any settings file.
2793    ///
2794    /// Docs: [`promptSuggestionEnabled`](https://code.claude.com/docs/en/settings-reference#promptsuggestionenabled).
2795    #[serde(skip_serializing_if = "Option::is_none")]
2796    pub prompt_suggestion_enabled: Option<bool>,
2797    /// Skip the one-time notice describing [auto
2798    /// mode](https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode)
2799    /// that Claude Code shows when you first enter auto mode yourself, for example through your
2800    /// own settings or the mode selector, rather than when the built-in default starts a
2801    /// session in it. Claude Code shows that notice once and then records that it was shown, so
2802    /// this key only matters where the notice hasn't appeared yet.
2803    ///
2804    /// - **Values**: Boolean
2805    ///   - `true`: Claude Code skips the notice
2806    ///   - `false`: the same as unset; the notice appears once unless another of these files
2807    ///     sets `true`
2808    /// - **Default**: unset, so the notice appears once
2809    /// - **Scope**: user or managed. A repository can't set it for you.
2810    ///
2811    /// Docs: [`skipAutoPermissionPrompt`](https://code.claude.com/docs/en/settings-reference#skipautopermissionprompt).
2812    #[serde(skip_serializing_if = "Option::is_none")]
2813    pub skip_auto_permission_prompt: Option<bool>,
2814    /// Underline misspelled words in the prompt input as you type, using a spell checker you
2815    /// install. Claude Code checks only the text in the input box. [Check spelling as you
2816    /// type](https://code.claude.com/docs/en/interactive-mode#check-spelling-as-you-type)
2817    /// covers installing aspell, hunspell, or ispell and what the checker covers.
2818    ///
2819    /// - **Values**: object with `enabled` (Boolean), `checker` (`"aspell"`, `"hunspell"`,
2820    ///   `"ispell"`, or `"auto"`), `language` (string, passed to the checker as its dictionary
2821    ///   name), and `color` (string, a terminal color name, `#rrggbb`, `rgb(r,g,b)`,
2822    ///   `ansi256(n)`, or `ansi:<name>`)
2823    /// - **Default**: unset, so spell checking is off; `checker` defaults to `"auto"`, the
2824    ///   first of the three found on `PATH`; `language` defaults to the checker's own
2825    ///   dictionary; `color` defaults to the theme's error color
2826    /// - **Scope**: user or managed. The block from the highest tier that sets it applies as a
2827    ///   whole.
2828    ///
2829    /// Docs: [`spellcheck`](https://code.claude.com/docs/en/settings-reference#spellcheck).
2830    #[serde(skip_serializing_if = "Option::is_none")]
2831    pub spellcheck: Option<Spellcheck>,
2832    /// Add SSH connections whose host comes from a command to the
2833    /// [Desktop](https://code.claude.com/docs/en/desktop#create-an-ssh-connection-from-a-command)
2834    /// environment selector. When you create a connection or create another machine for it,
2835    /// Desktop runs the entry's command on your computer and connects to the host that the
2836    /// command prints. Requires Claude Desktop v3.6556.0 or later on macOS or Linux, or
2837    /// v4.16336.0 or later on Windows, signed in with a Claude account.
2838    ///
2839    /// - **Values**: array of objects, each with required `id`, `name`, and `command` and
2840    ///   optional `sshIdentityFile` and `startDirectory`. Desktop doesn't read `command` as
2841    ///   shell syntax, so pipes and variables don't work: [write it as a program and its
2842    ///   arguments](https://code.claude.com/docs/en/desktop#write-the-command).
2843    /// - **Default**: unset
2844    /// - **Scope**: user or managed. Only the desktop app reads this key.
2845    ///
2846    /// Docs: [`sshHostCommands`](https://code.claude.com/docs/en/settings-reference#sshhostcommands).
2847    #[serde(skip_serializing_if = "Option::is_none")]
2848    pub ssh_host_commands: Option<Vec<SshHostCommand>>,
2849    /// Choose how long the [prompt cache](https://code.claude.com/docs/en/prompt-caching) holds
2850    /// the requests Claude Code makes outside the main conversation. This key applies to
2851    /// [subagents](https://code.claude.com/docs/en/sub-agents),
2852    /// [workflows](https://code.claude.com/docs/en/workflows), and Claude Code's own background
2853    /// and helper requests, such as compaction and session titles. The one-hour lifetime keeps
2854    /// the cache warm across longer breaks, and the API [bills each cache write at a higher
2855    /// rate](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing) than
2856    /// at the five-minute lifetime.
2857    ///
2858    /// - **Values**: string, one of:
2859    ///   - `"5m"`: the cache holds for five minutes
2860    ///   - `"1h"`: the cache holds for an hour
2861    /// - **Default**: unset, so each of these requests gets [its default
2862    ///   lifetime](https://code.claude.com/docs/en/prompt-caching#which-ttl-each-request-gets)
2863    /// - **Scope**: any settings file.
2864    ///
2865    /// Docs: [`subagentPromptCacheTtl`](https://code.claude.com/docs/en/settings-reference#subagentpromptcachettl).
2866    #[serde(skip_serializing_if = "Option::is_none")]
2867    pub subagent_prompt_cache_ttl: Option<CacheTtl>,
2868    /// Choose what happens when a [safety classifier flags a
2869    /// request](https://code.claude.com/docs/en/model-config#automatic-model-fallback): switch
2870    /// to the fallback model and continue, or pause so you can choose between switching and
2871    /// editing the prompt.
2872    ///
2873    /// - **Values**: Boolean
2874    ///   - `true`: Claude Code switches to the fallback model and continues
2875    ///   - `false`: in an interactive session Claude Code pauses so you can choose between
2876    ///     switching and editing the prompt; where no dialog can show, such as a `-p` run, the
2877    ///     flagged request ends as an error
2878    /// - **Default**: unset. Claude Code switches automatically, though it may [ask
2879    ///   first](https://code.claude.com/docs/en/model-config#ask-before-switching) in an
2880    ///   interactive session
2881    /// - **Scope**: any settings file. Appears in `/config` as **Switch models when a message
2882    ///   is flagged**, with the options **Switch automatically** and **Ask each time**.
2883    ///
2884    /// Docs: [`switchModelsOnFlag`](https://code.claude.com/docs/en/settings-reference#switchmodelsonflag).
2885    #[serde(skip_serializing_if = "Option::is_none")]
2886    pub switch_models_on_flag: Option<bool>,
2887    /// Turn off the download of the [plugins enabled for your claude.ai
2888    /// account](https://code.claude.com/docs/en/plugins/loading#synced-plugins). Claude Code
2889    /// downloads them into `~/.claude/plugins/synced/` at the start of terminal sessions where
2890    /// you sign in with your claude.ai account and in Cowork sessions, and loads each one as
2891    /// `<name>@synced`. Set `false` to stop that download and stop loading the plugins it
2892    /// already synced.
2893    ///
2894    /// - **Values**: Boolean
2895    ///   - `false`: Claude Code stops downloading synced plugins and stops loading the ones
2896    ///     already in `~/.claude/plugins/synced/`. In user or managed settings, it also moves
2897    ///     them to `~/.claude/plugins/.trash/`
2898    ///   - `true`: the same as unset
2899    /// - **Default**: unset, so sessions signed in with your claude.ai account sync your
2900    ///   plugins
2901    /// - **Scope**: user, local, or managed, and files passed with `--settings`. A repository
2902    ///   can't turn it off for you.
2903    ///
2904    /// Docs: [`syncClaudeAiPlugins`](https://code.claude.com/docs/en/settings-reference#syncclaudeaiplugins).
2905    #[serde(skip_serializing_if = "Option::is_none")]
2906    pub sync_claude_ai_plugins: Option<bool>,
2907    /// Turn off the download of the [skills enabled for your claude.ai
2908    /// account](https://code.claude.com/docs/en/skills#how-synced-skills-behave). Claude Code
2909    /// downloads them into `~/.claude/skills/synced/` in [terminal sessions where you sign in
2910    /// with your claude.ai
2911    /// account](https://code.claude.com/docs/en/skills#where-synced-skills-load), interactive
2912    /// or non-interactive, and in Cowork and cloud sessions. Set `false` to stop that download
2913    /// and stop loading the skills it already synced.
2914    ///
2915    /// - **Values**: Boolean
2916    ///   - `false`: Claude Code stops downloading synced skills and stops loading the ones
2917    ///     already in `~/.claude/skills/synced/`. In user or managed settings, it also moves
2918    ///     them to `~/.claude/skills/.trash/`
2919    ///   - `true`: the same as unset
2920    /// - **Default**: unset, so sessions signed in with your claude.ai account sync your skills
2921    /// - **Scope**: user, local, or managed, and files passed with `--settings`. A repository
2922    ///   can't turn it off for you.
2923    ///
2924    /// Docs: [`syncClaudeAiSkills`](https://code.claude.com/docs/en/settings-reference#syncclaudeaiskills).
2925    #[serde(skip_serializing_if = "Option::is_none")]
2926    pub sync_claude_ai_skills: Option<bool>,
2927    /// **Warning:** Removed in v2.1.277, together with the `TaskOutput` tool it sized. Setting
2928    /// it has no effect on current versions. Claude reads a background task's [output
2929    /// file](https://code.claude.com/docs/en/tools-reference#background-commands) with `Read`
2930    /// instead.
2931    ///
2932    /// - **Values**: a whole number of characters
2933    /// - **Default**: unset
2934    ///
2935    /// Docs: [`taskOutputMaxChars`](https://code.claude.com/docs/en/settings-reference#taskoutputmaxchars).
2936    #[serde(skip_serializing_if = "Option::is_none")]
2937    pub task_output_max_chars: Option<u64>,
2938    /// Claude Code sets your terminal tab's title. By default it uses a title it generates from
2939    /// the conversation, and once you give the session a
2940    /// [name](https://code.claude.com/docs/en/sessions#name-your-sessions) with `/rename` or
2941    /// `--name`, the tab shows that name instead. Set this key to `false` to keep the generated
2942    /// title on the tab even after you name the session.
2943    ///
2944    /// - **Values**: Boolean
2945    ///   - `true`: the terminal tab title shows the session name you set
2946    ///   - `false`: the tab keeps the title Claude Code generates from your conversation
2947    /// - **Default**: `true`
2948    /// - **Scope**: any settings file.
2949    ///
2950    /// Docs: [`terminalTitleFromRename`](https://code.claude.com/docs/en/settings-reference#terminaltitlefromrename).
2951    #[serde(skip_serializing_if = "Option::is_none")]
2952    pub terminal_title_from_rename: Option<bool>,
2953    /// Choose how Claude Code writes the times it shows in the interface, such as the `done
2954    /// 6:05 PM` at the end of each turn duration message and the timestamps in the [transcript
2955    /// viewer](https://code.claude.com/docs/en/interactive-mode#transcript-viewer). To pick a
2956    /// preset, run `/config` and set **Time format**. Requires Claude Code v2.1.257 or later.
2957    ///
2958    /// - **Values**: string, one of:
2959    ///   - `"auto"`: the same as unset; each time keeps its built-in format, which follows your
2960    ///     locale on the turn duration message
2961    ///   - `"12-hour"`: a 12-hour clock
2962    ///   - `"24-hour"`: a 24-hour clock
2963    ///   - `"24-hour-utc"`: a 24-hour clock in UTC with `Z` after the minutes, such as
2964    ///     `18:05Z`; Claude Code ignores
2965    ///     [`timeZone`](https://code.claude.com/docs/en/settings-reference#timezone) for this
2966    ///     preset
2967    ///   - A strftime pattern such as `"%H:%M"`: Claude Code writes each time with the pattern.
2968    ///     Any value that contains a `%` is a pattern, and any other value outside the presets
2969    ///     counts as `"auto"`
2970    /// - **Default**: `"auto"`
2971    /// - **Scope**: any settings file.
2972    ///
2973    /// Docs: [`timeFormat`](https://code.claude.com/docs/en/settings-reference#timeformat).
2974    #[serde(skip_serializing_if = "Option::is_none")]
2975    pub time_format: Option<TimeFormat>,
2976    /// Show the times in the interface in a time zone other than your system's. Set it to an
2977    /// [IANA time zone name](https://www.iana.org/time-zones), such as `"UTC"` or
2978    /// `"Europe/Dublin"`. The times that
2979    /// [`timeFormat`](https://code.claude.com/docs/en/settings-reference#timeformat) controls
2980    /// then show in this zone.
2981    ///
2982    /// - **Values**: string, an IANA time zone name. When Claude Code doesn't recognize the
2983    ///   name, it uses your system time zone
2984    /// - **Default**: unset, so times show in your system time zone
2985    /// - **Scope**: any settings file.
2986    ///
2987    /// Docs: [`timeZone`](https://code.claude.com/docs/en/settings-reference#timezone).
2988    #[serde(skip_serializing_if = "Option::is_none")]
2989    pub time_zone: Option<String>,
2990    /// Start sessions with
2991    /// [ultracode](https://code.claude.com/docs/en/workflows#let-claude-decide-with-ultracode)
2992    /// on. With it on, Claude plans a workflow for each substantive task instead of waiting for
2993    /// you to ask. Claude plans workflows only when [dynamic
2994    /// workflows](https://code.claude.com/docs/en/workflows) are enabled for you and your model
2995    /// supports `xhigh` effort.
2996    ///
2997    /// - **Values**: Boolean
2998    ///   - `true`: sessions start with ultracode on when dynamic workflows are enabled for you
2999    ///     and your model supports `xhigh`
3000    ///   - `false`: sessions start with ultracode off
3001    /// - **Default**: unset, so ultracode is off
3002    /// - **Scope**: any settings file.
3003    ///
3004    /// Docs: [`ultracode`](https://code.claude.com/docs/en/settings-reference#ultracode).
3005    #[serde(skip_serializing_if = "Option::is_none")]
3006    pub ultracode: Option<bool>,
3007
3008    /// Defaults for cloud sessions.
3009    ///
3010    /// - **Values**: object with `defaultEnvironmentId`
3011    /// - **Default**: unset
3012    ///
3013    /// Docs: [`remote`](https://code.claude.com/docs/en/settings-reference#remote-defaultenvironmentid).
3014    #[serde(skip_serializing_if = "Option::is_none")]
3015    pub remote: Option<Remote>,
3016    /// Keys Claude Code accepts here that this crate doesn't model (newer or
3017    /// undocumented ones), kept as written so the document round-trips.
3018    #[serde(flatten)]
3019    pub extra: Extra,
3020}
3021
3022impl Settings {
3023    /// Parses a settings document.
3024    ///
3025    /// # Errors
3026    ///
3027    /// When `json` isn't a JSON object, or a key this crate models holds
3028    /// a value of the wrong type (which Claude Code rejects as well).
3029    pub fn from_json_str(json: &str) -> serde_json::Result<Self> {
3030        serde_json::from_str(json)
3031    }
3032
3033    /// The document as compact JSON: the argument of `claude --settings`.
3034    ///
3035    /// # Errors
3036    ///
3037    /// Only if a value can't be written as JSON, which the types in this
3038    /// crate don't produce; the error is returned rather than a panic.
3039    pub fn to_json_string(&self) -> serde_json::Result<String> {
3040        serde_json::to_string(self)
3041    }
3042
3043    /// The document as indented JSON, for a settings file.
3044    ///
3045    /// # Errors
3046    ///
3047    /// As [`to_json_string`](Self::to_json_string).
3048    pub fn to_json_string_pretty(&self) -> serde_json::Result<String> {
3049        serde_json::to_string_pretty(self)
3050    }
3051
3052    /// Layers `higher` over `self` the way Claude Code combines its
3053    /// settings sources: call it on the lowest layer with each higher one
3054    /// in turn (user, then project, then local, then `--settings`, then
3055    /// managed). [`merge_values`](crate::merge_values) has the rules.
3056    ///
3057    /// # Errors
3058    ///
3059    /// Only if the merged document doesn't parse as `Settings` again,
3060    /// which two documents of these types can't produce; `self` is left
3061    /// unchanged then.
3062    pub fn merge(&mut self, higher: Settings) -> serde_json::Result<()> {
3063        let mut merged = serde_json::to_value(&*self)?;
3064        crate::merge_values(&mut merged, serde_json::to_value(higher)?);
3065        *self = serde_json::from_value(merged)?;
3066        Ok(())
3067    }
3068
3069    /// The dotted paths of the keys this document holds but this crate
3070    /// doesn't model (`extra` maps, hook types and hook events it doesn't
3071    /// know), such as `sandbox.network.newKey` or `hooks.NewEvent`.
3072    pub fn unknown_keys(&self) -> Vec<String> {
3073        let mut out = Vec::new();
3074        self.unknown("", &mut out);
3075        out
3076    }
3077}
3078
3079/// `null` as `Some(None)`, so a key set to `null` stays apart from an
3080/// absent one (`None`, from `default`).
3081#[allow(
3082    clippy::option_option,
3083    reason = "absent, null and a model are three states"
3084)]
3085fn nullable<'de, D: Deserializer<'de>>(d: D) -> Result<Option<Option<String>>, D::Error> {
3086    Option::<String>::deserialize(d).map(Some)
3087}
3088
3089walk!(Settings {
3090    attribution: "attribution",
3091    permissions: "permissions",
3092    allowed_mcp_servers: "allowedMcpServers",
3093    denied_mcp_servers: "deniedMcpServers",
3094    hooks: "hooks",
3095    allowed_channel_plugins: "allowedChannelPlugins",
3096    status_line: "statusLine",
3097    file_suggestion: "fileSuggestion",
3098    extra_known_marketplaces: "extraKnownMarketplaces",
3099    strict_known_marketplaces: "strictKnownMarketplaces",
3100    sandbox: "sandbox",
3101    spinner_verbs: "spinnerVerbs",
3102    spinner_tips_override: "spinnerTipsOverride",
3103    worktree: "worktree",
3104    plugin_configs: "pluginConfigs",
3105    blocked_marketplaces: "blockedMarketplaces",
3106    auto_mode: "autoMode",
3107    subagent_status_line: "subagentStatusLine",
3108    ssh_configs: "sshConfigs",
3109    voice: "voice",
3110    footer_links_regexes: "footerLinksRegexes",
3111    policy_helper: "policyHelper",
3112    model_picker: "modelPicker",
3113    model_pricing: "modelPricing",
3114    model_settings: "modelSettings",
3115    spellcheck: "spellcheck",
3116    ssh_host_commands: "sshHostCommands",
3117    remote: "remote",
3118});