Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/negative_test/claude-code-settings/invalid-enum-values.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"CLAUDE_CODE_DEBUG_LOG_LEVEL": "trace",
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "yes",
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "true",
"CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN": "yes",
"CLAUDE_CODE_DISABLE_ATTACHMENTS": "off",
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "yes",
"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS": "true",
Expand All @@ -39,11 +40,14 @@
"CLAUDE_CODE_EFFORT_LEVEL": "extreme",
"CLAUDE_CODE_ENABLE_AWAY_SUMMARY": "yes",
"CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH": "on",
"CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "enabled",
"CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING": "enable",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "yes",
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "1",
"CLAUDE_CODE_ENABLE_TASKS": "enable",
"CLAUDE_CODE_ENABLE_TELEMETRY": "yes",
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "enable",
"CLAUDE_CODE_FORCE_SYNC_OUTPUT": "enabled",
"CLAUDE_CODE_FORK_SUBAGENT": "true",
"CLAUDE_CODE_GLOB_HIDDEN": "1",
"CLAUDE_CODE_GLOB_NO_IGNORE": "yes",
Expand All @@ -53,8 +57,12 @@
"CLAUDE_CODE_MCP_ALLOWLIST_ENV": "all",
"CLAUDE_CODE_NEW_INIT": "start",
"CLAUDE_CODE_NO_FLICKER": "maybe",
"CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE": "yes",
"CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "auto",
"CLAUDE_CODE_PERFORCE_MODE": "on",
"CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE": "always",
"CLAUDE_CODE_PLUGIN_PREFER_HTTPS": "yes",
"CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY": "yes",
"CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST": "true",
"CLAUDE_CODE_PROXY_RESOLVES_HOSTS": "true",
"CLAUDE_CODE_REMOTE": "1",
Expand All @@ -80,16 +88,24 @@
"USE_BUILTIN_RIPGREP": "always"
},
"forceLoginMethod": "github",
"parentSettingsBehavior": "invalid-mode",
"permissions": {
"defaultMode": "invalid-mode",
"disableAutoMode": "enabled",
"disableBypassPermissionsMode": "enabled"
},
"skillOverrides": {
"test-skill": "invalid-mode"
},
"spinnerVerbs": {
"mode": "merge",
"verbs": ["Analyzing"]
},
"teammateMode": "split",
"tui": "mini",
"viewMode": "list"
"viewMode": "list",
"worktree": {
"baseRef": "invalid-ref",
"bgIsolation": "isolated"
}
}
141 changes: 138 additions & 3 deletions src/schemas/json/claude-code-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
"statusMessage": {
"type": "string",
"description": "Custom spinner message displayed while the hook runs"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Argument list for exec form. When present, spawns the command directly without shell interpretation — each element is passed as-is, so path placeholders never need quoting. See https://code.claude.com/docs/en/hooks#command-hook-fields"
}
}
},
Expand Down Expand Up @@ -104,6 +111,11 @@
"statusMessage": {
"type": "string",
"description": "Custom spinner message displayed while the hook runs"
},
"continueOnBlock": {
"type": "boolean",
"default": false,
"description": "When the prompt returns ok: false, feed the reason back to Claude and continue the turn instead of stopping. Implemented as continue: true on the resulting decision: \"block\". See https://code.claude.com/docs/en/hooks#prompt-hook-configuration"
}
}
},
Expand Down Expand Up @@ -410,6 +422,10 @@
"type": "string",
"description": "Google Vertex AI project ID"
},
"ANTHROPIC_WORKSPACE_ID": {
"type": "string",
"description": "Workspace ID for workload identity federation. Scopes the minted token to a specific workspace when the federation rule covers more than one. See https://code.claude.com/docs/en/env-vars"
},
"API_TIMEOUT_MS": {
"type": "string",
"description": "API request timeout in milliseconds (default: 600000)"
Expand Down Expand Up @@ -522,6 +538,11 @@
"description": "Disable adaptive reasoning",
"enum": ["0", "1"]
},
"CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN": {
"type": "string",
"description": "Disable alternate screen buffer rendering. When set to 1, keeps conversation in native scrollback instead of fullscreen renderer",
"enum": ["0", "1"]
},
"CLAUDE_CODE_DISABLE_ATTACHMENTS": {
"type": "string",
"description": "Disable attachment processing",
Expand Down Expand Up @@ -632,11 +653,21 @@
"description": "Refresh plugins at turn boundaries",
"enum": ["0", "1"]
},
"CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": {
"type": "string",
"description": "Enable feedback survey collection via OpenTelemetry for enterprises",
"enum": ["0", "1"]
},
"CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING": {
"type": "string",
"description": "Force fine-grained tool output streaming",
"enum": ["0", "1"]
},
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": {
"type": "string",
"description": "Enable model discovery from LLM gateway /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway",
"enum": ["0", "1"]
},
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": {
"type": "string",
"description": "Enable prompt suggestions",
Expand Down Expand Up @@ -669,6 +700,11 @@
"type": "string",
"description": "Token limit for file read operations"
},
"CLAUDE_CODE_FORCE_SYNC_OUTPUT": {
"type": "string",
"description": "Force synchronous output flushing. When set to 1, forces synchronized output on terminals that auto-detection misses (e.g., Emacs eat)",
"enum": ["0", "1"]
},
"CLAUDE_CODE_FORK_SUBAGENT": {
"type": "string",
"description": "Fork subagent processes in non-interactive sessions. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21120",
Expand Down Expand Up @@ -754,6 +790,11 @@
"type": "string",
"description": "OAuth access token"
},
"CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE": {
"type": "string",
"enum": ["0", "1"],
"description": "Set to 1 to pin fast mode to Claude Opus 4.6 instead of the default Opus 4.7. With this set, /fast runs on Opus 4.6. Without it, /fast runs on Opus 4.7. See https://code.claude.com/docs/en/fast-mode and https://code.claude.com/docs/en/env-vars"
},
"CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS": {
"type": "string",
"description": "OpenTelemetry span flush timeout in milliseconds (default: 5000)"
Expand All @@ -766,6 +807,11 @@
"type": "string",
"description": "OpenTelemetry shutdown timeout in milliseconds (default: 2000)"
},
"CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": {
"type": "string",
"description": "Enable automatic package manager updates. When set, Claude Code runs the upgrade command in background on Homebrew/WinGet and prompts to restart",
"enum": ["0", "1"]
},
"CLAUDE_CODE_PERFORCE_MODE": {
"type": "string",
"description": "Enable Perforce write protection mode",
Expand All @@ -784,10 +830,20 @@
"description": "Keep plugin cache on update failure",
"enum": ["0", "1"]
},
"CLAUDE_CODE_PLUGIN_PREFER_HTTPS": {
"type": "string",
"enum": ["0", "1"],
"description": "Set to 1 to clone GitHub owner/repo plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or environments without a configured SSH key for github.com. See https://code.claude.com/docs/en/env-vars"
},
"CLAUDE_CODE_PLUGIN_SEED_DIR": {
"type": "string",
"description": "Path(s) to pre-populated plugin directories"
},
"CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY": {
"type": "string",
"enum": ["0", "1"],
"description": "Set to 1 to stop Claude Code from passing -ExecutionPolicy Bypass when spawning PowerShell for tool calls, hooks, and status line commands. By default Claude Code bypasses execution policy so .ps1 scripts work on default-Restricted Windows installs. See https://code.claude.com/docs/en/env-vars"
},
"CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST": {
"type": "string",
"description": "Indicate that the host application manages provider routing",
Expand Down Expand Up @@ -867,6 +923,10 @@
"description": "Skip Google authentication for Vertex AI",
"enum": ["0", "1"]
},
"CLAUDE_CODE_STOP_HOOK_BLOCK_CAP": {
"type": "string",
"description": "Override the default maximum consecutive Stop hook blocks (default: 8) before the turn ends with a warning. Raise this when a stop hook legitimately needs more than 8 iterations to converge. See https://code.claude.com/docs/en/hooks-guide"
},
"CLAUDE_CODE_SUBAGENT_MODEL": {
"type": "string",
"description": "Override model used by subagents"
Expand Down Expand Up @@ -1128,7 +1188,7 @@
},
"fastMode": {
"type": "boolean",
"description": "Enable fast mode for Opus 4.6 (research preview). Fast mode uses the same model with 2.5x faster output at higher per-token cost. Requires extra usage enabled. Alternatively, toggle with /fast command. See https://code.claude.com/docs/en/fast-mode",
"description": "Enable fast mode, which uses Claude Opus 4.7 by default for 2.5x faster output at higher per-token cost. Requires extra usage enabled. Toggle with /fast command. Set CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 to pin fast mode to Opus 4.6. See https://code.claude.com/docs/en/fast-mode",
"default": false
},
"fastModePerSessionOptIn": {
Expand All @@ -1140,7 +1200,7 @@
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Probability (0\u20131) that the session quality survey appears when eligible. A value of 0.05 means 5% of eligible sessions. See https://code.claude.com/docs/en/settings#available-settings",
"description": "Probability (0–1) that the session quality survey appears when eligible. A value of 0.05 means 5% of eligible sessions. See https://code.claude.com/docs/en/settings#available-settings",
"examples": [0.05]
},
"enableAllProjectMcpServers": {
Expand Down Expand Up @@ -1540,6 +1600,10 @@
"type": "integer",
"minimum": 1,
"description": "Re-run the status line command every N seconds in addition to event-driven updates. Leave unset to run only on events. Useful for time-based data like clocks, or when background subagents change git state while the main session is idle. See https://code.claude.com/docs/en/statusline"
},
"hideVimModeIndicator": {
"type": "boolean",
"description": "Set to true when your status line script renders the vim mode indicator itself, to suppress the built-in vim mode display. See https://code.claude.com/docs/en/statusline#manually-configure-a-status-line"
}
},
"required": ["type", "command"],
Expand Down Expand Up @@ -2137,6 +2201,20 @@
"description": "Additional arguments to pass to the ripgrep binary"
}
}
},
"bwrapPath": {
"type": "string",
"minLength": 1,
"description": "(Managed setting only) Path to custom bubblewrap (bwrap) binary for Linux/WSL sandbox. Overrides default. See https://code.claude.com/docs/en/server-managed-settings"
},
"socatPath": {
"type": "string",
"minLength": 1,
"description": "(Managed setting only) Path to custom socat binary for Linux/WSL network proxying. Overrides default. See https://code.claude.com/docs/en/server-managed-settings"
},
"failIfUnavailable": {
"type": "boolean",
"description": "When true, make sandbox startup a hard failure if required sandbox dependencies are missing. Default: false (sandbox is skipped with a warning). See https://code.claude.com/docs/en/sandboxing#enable-sandboxing"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -2200,6 +2278,20 @@
"description": "Show turn duration messages after responses (e.g., \"Cooked for 1m 6s\"). Set to false to hide these messages (default: true)",
"default": true
},
"skillOverrides": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": ["on", "name-only", "user-invocable-only", "off"]
},
"description": "Per-skill visibility overrides. Controls whether skills appear to Claude and in the / picker. Values: 'on' (name and description shown, default), 'name-only' (name only), 'user-invocable-only' (hidden from Claude, visible in /), 'off' (hidden everywhere). Plugin skills are not affected by this setting. See https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings",
"examples": [
{
"legacy-context": "name-only",
"deploy": "off"
}
]
},
"prefersReducedMotion": {
"type": "boolean",
"description": "Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility",
Expand Down Expand Up @@ -2241,9 +2333,27 @@
},
"description": "Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos. See https://code.claude.com/docs/en/settings#worktree-settings",
"examples": [["packages/my-app", "shared/utils"]]
},
"baseRef": {
"type": "string",
"enum": ["fresh", "head"],
"default": "fresh",
"description": "Whether to branch worktrees from origin/<default> (fresh) or local HEAD (head). Default: fresh. Set to 'head' to preserve unpushed commits in new worktrees. See https://code.claude.com/docs/en/settings#worktree-settings"
},
"bgIsolation": {
"type": "string",
"enum": ["worktree", "none"],
"default": "worktree",
"description": "Isolation mode for background sessions. \"worktree\" blocks Edit/Write in main checkout until EnterWorktree is called; \"none\" lets background jobs edit the working copy directly without EnterWorktree, for repos where worktrees are impractical. See https://code.claude.com/docs/en/settings#worktree-settings"
}
}
},
"parentSettingsBehavior": {
"type": "string",
"enum": ["first-wins", "merge"],
"default": "first-wins",
"description": "(Admin/managed settings only) Controls how SDK managedSettings (parent tier) merge with inherited settings. 'first-wins': first non-empty value applies (default). 'merge': merge arrays and objects. See https://code.claude.com/docs/en/server-managed-settings"
},
"pluginTrustMessage": {
"type": "string",
"description": "(Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use to provide organization-specific context about approved plugins. See https://code.claude.com/docs/en/settings#plugin-settings",
Expand Down Expand Up @@ -2508,12 +2618,19 @@
"type": "string"
},
"description": "Entries for the auto mode classifier environment section. Replaces the built-in environment context entirely unless the literal string \"$defaults\" is included as an entry, which splices the built-in defaults in at that position."
},
"hard_deny": {
"type": "array",
"items": {
"type": "string"
},
"description": "Rules for the auto mode classifier hard-deny section. Hard-deny rules block unconditionally regardless of user intent. Replaces the built-in hard-deny rules entirely unless the literal string \"$defaults\" is included as an entry, which splices the built-in defaults in at that position. See https://code.claude.com/docs/en/permissions"
}
}
},
"channelsEnabled": {
"type": "boolean",
"description": "(Teams/Enterprise) Opt-in for channel notifications \u2014 MCP servers with the claude/channel capability pushing inbound messages. Default off. When true, users can select servers via --channels. See https://code.claude.com/docs/en/mcp",
"description": "(Teams/Enterprise) Opt-in for channel notifications — MCP servers with the claude/channel capability pushing inbound messages. Default off. When true, users can select servers via --channels. See https://code.claude.com/docs/en/mcp",
"default": false
},
"defaultShell": {
Expand Down Expand Up @@ -2591,6 +2708,24 @@
"wslInheritsWindowsSettings": {
"type": "boolean",
"description": "(Windows managed settings only) When true, Claude Code on WSL reads managed settings from the Windows policy chain in addition to /etc/claude-code, with Windows sources taking priority. Only honored when set in the HKLM registry key or C:\\Program Files\\ClaudeCode\\managed-settings.json, both of which require Windows admin to write. For HKCU policy to also apply on WSL, the flag must additionally be set in HKCU itself. Has no effect on native Windows. See https://code.claude.com/docs/en/settings#available-settings"
},
"subagentStatusLine": {
"type": "object",
"additionalProperties": false,
"description": "Status line configuration for subagent sessions. See https://code.claude.com/docs/en/statusline#subagent-status-lines",
"required": ["type", "command"],
"properties": {
"type": {
"type": "string",
"const": "command",
"description": "Must be \"command\""
},
"command": {
"type": "string",
"description": "Shell command to run for the subagent status line",
"minLength": 1
}
}
}
},
"title": "Claude Code Settings"
Expand Down
20 changes: 18 additions & 2 deletions src/test/claude-code-settings/edge-cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
"effortLevel": "low",
"env": {
"CLAUDE_CODE_DEBUG_LOG_LEVEL": "info",
"CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN": "0",
"CLAUDE_CODE_DISABLE_ATTACHMENTS": "0",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "0",
"CLAUDE_CODE_EFFORT_LEVEL": "max"
"CLAUDE_CODE_EFFORT_LEVEL": "max",
"CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "0",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "0",
"CLAUDE_CODE_FORCE_SYNC_OUTPUT": "0",
"CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE": "0",
"CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "0",
"CLAUDE_CODE_PLUGIN_PREFER_HTTPS": "0",
"CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY": "0"
},
"fastMode": false,
"forceLoginMethod": "claudeai",
"parentSettingsBehavior": "first-wins",
"permissions": {
"allow": [],
"ask": [],
Expand All @@ -19,11 +28,18 @@
"prefersReducedMotion": false,
"respectGitignore": true,
"showTurnDuration": true,
"skillOverrides": {
"custom-skill": "on"
},
"spinnerTipsEnabled": true,
"spinnerVerbs": {
"mode": "append",
"verbs": ["Thinking"]
},
"teammateMode": "in-process",
"terminalProgressBarEnabled": true
"terminalProgressBarEnabled": true,
"worktree": {
"baseRef": "fresh",
"bgIsolation": "worktree"
}
}
Loading
Loading