feat(claude-code-settings): sync to Claude Code v2.1.143 - #5706
Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
|
Thanks for the PR! This section of the codebase is owned by @domdomegg, @bogini, @sarahdeaton, and @ant-kurt - if they write a comment saying "LGTM" then it will be merged. |
domdomegg
left a comment
There was a problem hiding this comment.
LGTM. Thorough sync — the new fields all line up with the v2.1.139–2.1.143 changes, descriptions cite the right docs/changelog anchors, and I like that you've covered each addition with positive tests plus negative tests for the new enums (bgIsolation, the 0/1 env vars). The alphabetical re-sort of the env properties to satisfy the coverage gate is correct too. Thanks for the detailed write-up.
|
@domdomegg Didn't end up merging. It seems like a flaky failure on CI. |
|
LGTM |
|
Merging because @domdomegg is a code-owner of all the changes - thanks! |
Schema
worktree.bgIsolationstring enum["worktree","none"], default"worktree"—"none"lets background sessions edit the working copy directly withoutEnterWorktree, for repos where worktrees are impractical. (v2.1.143, settings#worktree-settings)args: string[]to commandhookCommand— exec form spawns command directly without shell interpretation so path placeholders never need quoting. (v2.1.139, hooks#command-hook-fields)continueOnBlock: boolean(defaultfalse) to prompthookCommand— when prompt returnsok: false, feeds reason back to Claude and continues the turn instead of stopping. (v2.1.139, hooks#prompt-hook-configuration)subagentStatusLinetop-level object{type: "command", command: string}for subagent status line configuration. (statusline#subagent-status-lines)statusLine.hideVimModeIndicator: boolean— suppress built-in vim mode display when the status line script renders it itself. (statusline#manually-configure-a-status-line)sandbox.failIfUnavailable: boolean— make sandbox startup a hard failure when required dependencies are missing. (sandboxing#enable-sandboxing)ANTHROPIC_WORKSPACE_IDenv var — workspace ID for workload identity federation, scopes minted token to a specific workspace. (v2.1.141, env-vars)CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDEenv var — pin fast mode to Opus 4.6 instead of Opus 4.7 default. (v2.1.142, env-vars)CLAUDE_CODE_PLUGIN_PREFER_HTTPSenv var — clone GitHub plugin sources over HTTPS instead of SSH. (v2.1.141, env-vars)CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICYenv var — respect Windows PowerShell execution policy instead of bypassing it. (v2.1.143, env-vars)CLAUDE_CODE_STOP_HOOK_BLOCK_CAPenv var — override default max consecutive Stop hook blocks (default: 8). (v2.1.143, hooks-guide)fastModedescription: Opus 4.7 is now the default for fast mode since v2.1.142; addCLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1reference. (v2.1.142, fast-mode)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_UPDATEto correct alphabetical positions in$.env.properties(to pass coverage gate)Tests
worktree.bgIsolation: "none",subagentStatusLine,sandbox.failIfUnavailable: true,statusLine.hideVimModeIndicator: true, 5 new env vars (value"1"), prompt hook withcontinueOnBlock: true, and command hook withargs(exec form) tomodern-complete-config.jsonworktree.bgIsolation: "worktree"(default) and 3 new env vars (value"0") toedge-cases.jsonargsto existing command hook and new prompt hook withcontinueOnBlock: truetohooks-complete.jsonNegative tests
worktree.bgIsolation: "isolated"(invalid enum) toinvalid-enum-values.json"yes"enum values forCLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE,CLAUDE_CODE_PLUGIN_PREFER_HTTPS,CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICYSkipped
MultiEditinpermissionRuleregex — already covered by open PR claude-code-settings: add MultiEdit to permission rule regex #5701$schemahttp://→https://redirect — cosmetic onlySupersedes #5665
🤖 Generated with Claude Code