From 73c86010b492af703da70c3023cca36df2f0737f Mon Sep 17 00:00:00 2001 From: Mitesh Ashar Date: Sun, 10 May 2026 11:05:28 +0530 Subject: [PATCH 1/2] feat(claude-code-settings): sync to Claude Code v2.1.138 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Schema: - Add `worktree.baseRef` enum [fresh, head] to control worktree branch source (v2.1.133) - Add `sandbox.bwrapPath` and `sandbox.socatPath` managed-only paths for custom sandbox binaries (v2.1.133) - Add `parentSettingsBehavior` admin-tier setting to control SDK managedSettings merge behavior (v2.1.133) - Add `autoMode.hard_deny` array for unconditional-block classifier rules (v2.1.136) - Add `skillOverrides` object for per-skill visibility control with enum [on, name-only, user-invocable-only, off] (v2.1.129) - Add 5 missing environment variables: CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN, CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL, CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY, CLAUDE_CODE_FORCE_SYNC_OUTPUT, CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE (v2.1.129–v2.1.136) Tests: - Update modern-complete-config.json: add all new properties with valid examples - Update edge-cases.json: add default enum values for worktree.baseRef (fresh), parentSettingsBehavior (first-wins), and all 5 env vars with "0" value Negative tests: - Update invalid-enum-values.json: add invalid enum values for worktree.baseRef, parentSettingsBehavior, skillOverrides, and 5 env vars All 8 coverage checks passing. Changes verified against documentation and schemas. Co-Authored-By: Claude Sonnet 4.6 --- .../invalid-enum-values.json | 14 ++++- src/schemas/json/claude-code-settings.json | 63 +++++++++++++++++++ src/test/claude-code-settings/edge-cases.json | 16 ++++- .../modern-complete-config.json | 17 ++++- 4 files changed, 106 insertions(+), 4 deletions(-) diff --git a/src/negative_test/claude-code-settings/invalid-enum-values.json b/src/negative_test/claude-code-settings/invalid-enum-values.json index 2b734919edb..3013110cbb8 100644 --- a/src/negative_test/claude-code-settings/invalid-enum-values.json +++ b/src/negative_test/claude-code-settings/invalid-enum-values.json @@ -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", @@ -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", @@ -53,6 +57,7 @@ "CLAUDE_CODE_MCP_ALLOWLIST_ENV": "all", "CLAUDE_CODE_NEW_INIT": "start", "CLAUDE_CODE_NO_FLICKER": "maybe", + "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "auto", "CLAUDE_CODE_PERFORCE_MODE": "on", "CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE": "always", "CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST": "true", @@ -80,16 +85,23 @@ "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" + } } diff --git a/src/schemas/json/claude-code-settings.json b/src/schemas/json/claude-code-settings.json index 9e7ecf2cf02..47e66277d3d 100644 --- a/src/schemas/json/claude-code-settings.json +++ b/src/schemas/json/claude-code-settings.json @@ -974,6 +974,31 @@ "type": "string", "description": "Use the bundled ripgrep binary instead of system ripgrep", "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_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": { + "type": "string", + "description": "Enable feedback survey collection via OpenTelemetry for enterprises", + "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_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_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"] } }, "propertyNames": { @@ -2137,6 +2162,16 @@ "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" } }, "additionalProperties": false @@ -2200,6 +2235,15 @@ "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", @@ -2241,9 +2285,21 @@ }, "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/ (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" } } }, + "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", @@ -2508,6 +2564,13 @@ "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" } } }, diff --git a/src/test/claude-code-settings/edge-cases.json b/src/test/claude-code-settings/edge-cases.json index dfdba3584c1..e012806bd9a 100644 --- a/src/test/claude-code-settings/edge-cases.json +++ b/src/test/claude-code-settings/edge-cases.json @@ -4,12 +4,18 @@ "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_PACKAGE_MANAGER_AUTO_UPDATE": "0" }, "fastMode": false, "forceLoginMethod": "claudeai", + "parentSettingsBehavior": "first-wins", "permissions": { "allow": [], "ask": [], @@ -19,11 +25,17 @@ "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" + } } diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index c65532108d2..38c6ebed9c3 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -16,6 +16,7 @@ "autoMode": { "allow": ["$defaults", "All read-only operations"], "environment": ["$defaults", "WSL2 on Windows"], + "hard_deny": ["Running executable files", "Writing to system directories"], "soft_deny": ["$defaults", "Deleting files"] }, "autoUpdatesChannel": "latest", @@ -49,9 +50,14 @@ "ANTHROPIC_BEDROCK_SERVICE_TIER": "priority", "ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022", "ANTHROPIC_SMALL_FAST_MODEL": "claude-3-5-haiku-20241022", + "CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN": "1", "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1", + "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "1", + "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1", + "CLAUDE_CODE_FORCE_SYNC_OUTPUT": "1", "CLAUDE_CODE_FORK_SUBAGENT": "1", "CLAUDE_CODE_HIDE_CWD": "1", + "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "1", "CLAUDE_LOG_LEVEL": "debug", "PROJECT_ROOT": "/home/user/projects" }, @@ -241,6 +247,7 @@ }, "otelHeadersHelper": "/usr/local/bin/otel-headers.sh", "outputStyle": "Explanatory", + "parentSettingsBehavior": "merge", "permissions": { "additionalDirectories": ["~/Documents/reference", "~/.config/claude-code"], "allow": [ @@ -289,6 +296,7 @@ "sandbox": { "allowUnsandboxedCommands": false, "autoAllowBashIfSandboxed": false, + "bwrapPath": "/usr/bin/bwrap", "enableWeakerNestedSandbox": false, "enableWeakerNetworkIsolation": true, "enabled": true, @@ -314,11 +322,17 @@ "ripgrep": { "args": ["--hidden"], "command": "/usr/bin/rg" - } + }, + "socatPath": "/usr/bin/socat" }, "showClearContextOnPlanAccept": true, "showThinkingSummaries": true, "showTurnDuration": false, + "skillOverrides": { + "deploy": "off", + "internal-tool": "user-invocable-only", + "legacy-context": "name-only" + }, "skipDangerousModePermissionPrompt": true, "skipWebFetchPreflight": false, "skippedMarketplaces": ["untrusted-marketplace"], @@ -346,6 +360,7 @@ "viewMode": "focus", "voiceEnabled": true, "worktree": { + "baseRef": "head", "sparsePaths": ["packages/my-app", "shared/utils"] }, "wslInheritsWindowsSettings": false From 73fad54e89e2d87948fefcdf6e14f6d880e2ab09 Mon Sep 17 00:00:00 2001 From: Mitesh Ashar Date: Tue, 19 May 2026 17:54:36 +0530 Subject: [PATCH 2/2] feat(claude-code-settings): sync to Claude Code v2.1.143 Schema: - Add worktree.bgIsolation enum ["worktree","none"] default "worktree" for background session isolation - Add args: string[] to command hookCommand for exec form (spawns without shell) - Add continueOnBlock: boolean to prompt hookCommand (feeds block reason back to Claude on ok: false) - Add subagentStatusLine top-level object {type, command} for subagent status line - Add statusLine.hideVimModeIndicator boolean - Add sandbox.failIfUnavailable boolean - Add ANTHROPIC_WORKSPACE_ID env var (workload identity federation) - Add CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE env var (pin fast mode to Opus 4.6) - Add CLAUDE_CODE_PLUGIN_PREFER_HTTPS env var (clone plugins over HTTPS) - Add CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY env var - Add CLAUDE_CODE_STOP_HOOK_BLOCK_CAP env var (override default block cap of 8) - Update fastMode description: Opus 4.7 now default since v2.1.142 - Sort DISABLE_ALTERNATE_SCREEN, ENABLE_FEEDBACK_SURVEY_FOR_OTEL, ENABLE_GATEWAY_MODEL_DISCOVERY, FORCE_SYNC_OUTPUT, PACKAGE_MANAGER_AUTO_UPDATE to correct alphabetical positions Tests: - Add bgIsolation "none", subagentStatusLine, failIfUnavailable, hideVimModeIndicator, 5 new env vars ("1"), continueOnBlock:true prompt hook, exec-form args hook to modern-complete-config.json - Add bgIsolation "worktree" (default) and 3 new env vars ("0") to edge-cases.json - Add exec-form args and continueOnBlock:true prompt hook to hooks-complete.json Negative tests: - Add invalid bgIsolation enum value to invalid-enum-values.json - Add invalid "yes" enum values for CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE, CLAUDE_CODE_PLUGIN_PREFER_HTTPS, CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY Co-Authored-By: Claude Sonnet 4.6 --- .../invalid-enum-values.json | 6 +- src/schemas/json/claude-code-settings.json | 130 ++++++++++++++---- src/test/claude-code-settings/edge-cases.json | 8 +- .../claude-code-settings/hooks-complete.json | 16 +++ .../modern-complete-config.json | 34 +++++ 5 files changed, 162 insertions(+), 32 deletions(-) diff --git a/src/negative_test/claude-code-settings/invalid-enum-values.json b/src/negative_test/claude-code-settings/invalid-enum-values.json index 3013110cbb8..5ed0d2d0b1e 100644 --- a/src/negative_test/claude-code-settings/invalid-enum-values.json +++ b/src/negative_test/claude-code-settings/invalid-enum-values.json @@ -57,9 +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", @@ -102,6 +105,7 @@ "tui": "mini", "viewMode": "list", "worktree": { - "baseRef": "invalid-ref" + "baseRef": "invalid-ref", + "bgIsolation": "isolated" } } diff --git a/src/schemas/json/claude-code-settings.json b/src/schemas/json/claude-code-settings.json index 47e66277d3d..de4b597fd8b 100644 --- a/src/schemas/json/claude-code-settings.json +++ b/src/schemas/json/claude-code-settings.json @@ -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" } } }, @@ -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" } } }, @@ -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)" @@ -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", @@ -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", @@ -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", @@ -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)" @@ -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", @@ -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", @@ -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" @@ -974,31 +1034,6 @@ "type": "string", "description": "Use the bundled ripgrep binary instead of system ripgrep", "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_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": { - "type": "string", - "description": "Enable feedback survey collection via OpenTelemetry for enterprises", - "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_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_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"] } }, "propertyNames": { @@ -1153,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": { @@ -1165,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": { @@ -1565,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"], @@ -2172,6 +2211,10 @@ "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 @@ -2242,7 +2285,12 @@ "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" }] + "examples": [ + { + "legacy-context": "name-only", + "deploy": "off" + } + ] }, "prefersReducedMotion": { "type": "boolean", @@ -2291,6 +2339,12 @@ "enum": ["fresh", "head"], "default": "fresh", "description": "Whether to branch worktrees from origin/ (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" } } }, @@ -2576,7 +2630,7 @@ }, "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": { @@ -2654,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" diff --git a/src/test/claude-code-settings/edge-cases.json b/src/test/claude-code-settings/edge-cases.json index e012806bd9a..1f85fa4234f 100644 --- a/src/test/claude-code-settings/edge-cases.json +++ b/src/test/claude-code-settings/edge-cases.json @@ -11,7 +11,10 @@ "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "0", "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "0", "CLAUDE_CODE_FORCE_SYNC_OUTPUT": "0", - "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "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", @@ -36,6 +39,7 @@ "teammateMode": "in-process", "terminalProgressBarEnabled": true, "worktree": { - "baseRef": "fresh" + "baseRef": "fresh", + "bgIsolation": "worktree" } } diff --git a/src/test/claude-code-settings/hooks-complete.json b/src/test/claude-code-settings/hooks-complete.json index a1d1329782c..066c9f845d9 100644 --- a/src/test/claude-code-settings/hooks-complete.json +++ b/src/test/claude-code-settings/hooks-complete.json @@ -123,6 +123,17 @@ } ], "matcher": "Edit" + }, + { + "hooks": [ + { + "continueOnBlock": true, + "prompt": "Verify the read file doesn't contain secrets. $ARGUMENTS", + "timeout": 10, + "type": "prompt" + } + ], + "matcher": "Read" } ], "PostToolUseFailure": [ @@ -182,6 +193,11 @@ { "hooks": [ { + "args": [ + "bash", + "-c", + "echo 'Session started' >> /tmp/claude-session.log" + ], "command": "echo 'Session started' >> /tmp/claude-session.log", "type": "command" } diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index 38c6ebed9c3..73c63c28b2e 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -50,6 +50,7 @@ "ANTHROPIC_BEDROCK_SERVICE_TIER": "priority", "ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022", "ANTHROPIC_SMALL_FAST_MODEL": "claude-3-5-haiku-20241022", + "ANTHROPIC_WORKSPACE_ID": "ws-abc123", "CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN": "1", "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1", "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "1", @@ -57,7 +58,11 @@ "CLAUDE_CODE_FORCE_SYNC_OUTPUT": "1", "CLAUDE_CODE_FORK_SUBAGENT": "1", "CLAUDE_CODE_HIDE_CWD": "1", + "CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE": "1", "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "1", + "CLAUDE_CODE_PLUGIN_PREFER_HTTPS": "1", + "CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY": "1", + "CLAUDE_CODE_STOP_HOOK_BLOCK_CAP": "12", "CLAUDE_LOG_LEVEL": "debug", "PROJECT_ROOT": "/home/user/projects" }, @@ -132,6 +137,18 @@ ] } ], + "PostToolUse": [ + { + "hooks": [ + { + "continueOnBlock": true, + "prompt": "Check if the written file looks correct. $ARGUMENTS", + "type": "prompt" + } + ], + "matcher": "Write" + } + ], "PostToolUseFailure": [ { "hooks": [ @@ -162,6 +179,16 @@ } ], "matcher": "Write" + }, + { + "hooks": [ + { + "args": ["/usr/local/bin/check-bash", "--strict"], + "command": "/usr/local/bin/check-bash", + "type": "command" + } + ], + "matcher": "Bash" } ], "Stop": [ @@ -301,6 +328,7 @@ "enableWeakerNetworkIsolation": true, "enabled": true, "excludedCommands": ["docker", "git"], + "failIfUnavailable": true, "filesystem": { "allowManagedReadPathsOnly": false, "allowRead": ["~/.ssh/known_hosts"], @@ -348,11 +376,16 @@ }, "statusLine": { "command": "~/.claude/statusline.sh", + "hideVimModeIndicator": true, "padding": 1, "refreshInterval": 5, "type": "command" }, "strictPluginOnlyCustomization": ["skills", "hooks"], + "subagentStatusLine": { + "command": "~/.claude/subagent-statusline.sh", + "type": "command" + }, "teammateMode": "tmux", "terminalProgressBarEnabled": false, "tui": "default", @@ -361,6 +394,7 @@ "voiceEnabled": true, "worktree": { "baseRef": "head", + "bgIsolation": "none", "sparsePaths": ["packages/my-app", "shared/utils"] }, "wslInheritsWindowsSettings": false