feat(claude-code): sync settings and keybindings to Claude Code v2.1.251 - #6273
Open
miteshashar wants to merge 2 commits into
Open
miteshashar wants to merge 2 commits into
miteshashar wants to merge 2 commits into
Conversation
The per-setting reference moved out of settings.md into a new settings-reference.md, so most doc links in this schema no longer resolved to per-key content. Additions were reconciled against that page's full 219-key table and env-vars.md's 346-row table, not just the changelog. Schema: - Add 23 settings properties: autoCompactWindow, autoContinueAtUsageLimit, crossSessionInbound, desktopSessionCleanupPeriodDays, dialogExpiry, disableCommandPluginSources, disableDesktopLocalSessions, enableWorkflows, feedbackDrafts, isolatePeerMachines, keybindingFlavor, managedSourcesBehavior, modelPricing, promptCacheTtl, promptSuggestionEnabled, remote.defaultEnvironmentId, skipAutoPermissionPrompt, spellcheck, subagentPromptCacheTtl, switchModelsOnFlag, syncClaudeAiSkills, terminalTitleFromRename, ultracode - Add the sandbox.credentials masking surface: mode "mask" on files[] and envVars[], the documented mask fields, awsPairs and sigv4. mode was a closed enum of ["deny"] with additionalProperties false, so every documented masking config failed validation - Add 39 environment variables, 5 of which appear on no reference table and are documented only on agent-sdk pages - Remove 11 environment variables the docs describe as set by Claude Code rather than read from a settings env block, and CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION (removed upstream in v2.1.224) - Remove teammateDefaultModel (removed upstream in v2.1.234), skippedMarketplaces and skippedPlugins (documented nowhere) - permissionRule: add the 18 documented tools the pattern was missing, so deny rules naming them stop being flagged as invalid (SchemaStore#6236) - Relax the .git suffix requirement on marketplace git URLs (SchemaStore#5874, @esp0) - Drop stale UNDOCUMENTED. prefixes from Setup, DirectoryAdded, autoMode.classifyAllShell and sandbox.network.strictAllowlist - Correct workflowSizeGuideline's default, outputStyle's built-in list, browserExternalPageTools' enum, and the descriptions of disableAutoMode, allowManagedPermissionRulesOnly, parentSettingsBehavior, fallbackModel, availableModels, enableArtifact, disableArtifact and managedMcpServers - Migrate 65 doc links to settings-reference anchors, and add links to the 13 properties and 13 hook events that had none, so every top-level property now carries a doc link - Keybindings: add the DiffPanel context, app:cycleDiffBase and chat:queueSubmit Tests: - modern-complete-config.json: all 23 new properties with non-default values, plus a full sandbox.credentials masking configuration - env-variables.json: all 39 new environment variables - enum-coverage.json, edge-cases.json, basic-config.json, complete-config.json, managed-settings.json, permissions-advanced.json: remaining enum values and non-default values to satisfy the coverage gate - marketplace-host-pattern.json, managed-settings.json: Azure DevOps marketplace URLs without a .git suffix - claude-code-keybindings: DiffPanel context and the two new actions Negative tests: - invalid-enum-values.json: invalid values for the new settings and environment variable enums, and for sandbox.credentials mode, onExtractNoMatch and sigv4 - Remove invalid-blocked-marketplace-git-url.json and invalid-marketplace-host-pattern.json, which asserted that a missing .git suffix is invalid Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Thanks for the PR! This section of the codebase is owned by @domdomegg, @bogini, and @sarahdeaton - if they write a comment saying "LGTM" then it will be merged. |
This was referenced Aug 30, 2026
…t no longer exist Found by a new anchor-existence check in link-audit.sh. A docs page returns 200 whether or not the fragment exists, so reachability alone never caught these. - alwaysThinkingEnabled -> model-config#extended-thinking - allowedMcpServers, deniedMcpServers -> managed-mcp#policy-based-control-with-allowlists-and-denylists - FORCE_PROMPT_CACHING_5M -> prompt-caching#choose-the-ttl-yourself - sandbox.enabled, sandbox.failIfUnavailable -> settings-reference per-key anchors - sandbox.filesystem.allowWrite, .allowRead -> settings-reference per-key anchors Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
claude-code-settings.jsonandclaude-code-keybindings.jsonfrom the last synced v2.1.220 (#6131) up to v2.1.251.The per-setting reference moved out of the settings page into a new settings-reference page (219 keys, one section each). Both pages remain;
settingsnow covers settings files, precedence and scopes. Mostsettings#...anchors in this schema no longer resolved to per-key content. Additions were reconciled against that page's full table and the 346-row env-vars table, not just the changelog.Schema
Correctness fix: sandbox credential masking was rejected outright
sandbox.credentials.files[].modeand.envVars[].modewere a closed enum of["deny"], and both item schemas setadditionalProperties: false— so every documented credential-masking config failed validation."mode": "mask"has been documented since v2.1.199 for environment variables and v2.1.221 for files.Adds
"mask"to both enums, the documented mask fields (extract,onExtractNoMatch,decode,maskClaims,injectHosts, plusmaskDuplicateson files only), and the two missing sibling objectsawsPairsandsigv4(both v2.1.224). Every constraint is taken from the doc's own "Mask fields for files" / "Mask fields for environment variables" tables rather than inferred from the neighbouring shape — see sandboxing#protect-credentials.New settings properties (23)
autoCompactWindow,autoContinueAtUsageLimit(v2.1.234),crossSessionInbound(v2.1.224),desktopSessionCleanupPeriodDays(v2.1.248),dialogExpiry(v2.1.224),disableCommandPluginSources(v2.1.229),disableDesktopLocalSessions,enableWorkflows,feedbackDrafts,isolatePeerMachines(v2.1.224),keybindingFlavor(v2.1.238),managedSourcesBehavior(v2.1.242),modelPricing(v2.1.242),promptCacheTtlandsubagentPromptCacheTtl(v2.1.242),promptSuggestionEnabled,remote.defaultEnvironmentId,skipAutoPermissionPrompt,spellcheck(v2.1.235),switchModelsOnFlag(v2.1.170),syncClaudeAiSkills,terminalTitleFromRename,ultracode.ultracodewas skipped in #6131 because settings.md then stated the key "isn't read fromsettings.json". settings-reference#ultracode now states the opposite — "Claude Code reads this key but never writes it", ScopeAny file— so that skip is superseded by a documentation change rather than reversed on judgement.Removed environment variables (12)
$.env.propertiesmodels theenvblock inside a settings file. These 11 are documented as set by Claude Code into subprocesses, not read from that block, so listing them advertised keys that do nothing there:CLAUDECODE,CLAUDE_CODE_BRIDGE_SESSION_ID,CLAUDE_CODE_CHILD_SESSION,CLAUDE_CODE_REMOTE,CLAUDE_CODE_REMOTE_SESSION_ID,CLAUDE_CODE_SESSION_ID,CLAUDE_EFFORT,CLAUDE_PID,CLAUDE_PROJECT_DIR,CLAUDE_CODE_TEAM_NAME,CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST.The last two rest on weaker evidence than the rest:
CLAUDE_CODE_TEAM_NAMEis documented nowhere, andCLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTis described as set by embedding host platforms.CLAUDE_CODE_PROCESS_WRAPPERwas deliberately kept — its row says to set it in theenvblock of user or managed settings, the opposite of the others.Plus
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION, removed upstream in v2.1.224 and now a no-op.$.envkeepsadditionalProperties, so none of these removals can invalidate an existing settings file.Removed settings properties (3)
teammateDefaultModel— removed upstream in v2.1.234; settings-reference carries a warning that setting it has no effect, and points atCLAUDE_CODE_SUBAGENT_MODELinstead.skippedMarketplaces,skippedPlugins— documented on no page, and absent from live settings files on a machine with many plugins installed and several explicitly disabled.New environment variables (39)
Five appear on no reference table at all and are documented only on Agent SDK pages:
CLAUDE_AGENT_SDK_CLIENT_APP,CLAUDE_CODE_ENABLE_REFRESH_MCP_TOOLS,CLAUDE_CODE_REPL,TRACEPARENT,TRACESTATE.MCP_PROTOCOL_NEGOTIATIONandMCP_SDK_GENERATIONget no enum even though the docs name their two accepted values, because the docs also say an unrecognized value is ignored with a debug warning rather than rejected.permissionRule
Adds the 18 documented tools the pattern was missing, so
denyrules naming them stop being flagged as invalid in editors — raised by @asgeirtj in #6236. All 14 tools marked "Permission required: Yes" in tools-reference were already present; the gap was entirely in the no-permission-required set, which is legitimately denyable.Cd,KillShellandMultiEditare retained as before.That thread also proposed splitting the pattern into separate
allowanddenyforms. That half is not done here — see Skipped.Marketplace git URLs
Relaxes the
.gitsuffix requirement on thegitsource ofextraKnownMarketplacesandblockedMarketplaces, so Azure DevOps and AWS CodeCommit URLs validate. This is @esp0's work from #5874, folded in with credit after being deferred in #6131. Per plugin-marketplaces#git-repositories: "The.gitsuffix is optional, so Azure DevOps and AWS CodeCommit URLs without the suffix work."strictKnownMarketplaces'sgitvariant already carried no such pattern, so the schema was internally inconsistent.Accuracy fixes
workflowSizeGuideline: defaultunrestricted→medium, with the documented small (<5) / medium (<15) / large (<50) agent bounds. v2.1.219 is also the first version that reads the key from a settings file.outputStyle: addConcise(v2.1.237).browserExternalPageTools: adddisable, which the desktop app also accepts — the previous enum rejected a valid value.disableAutoMode: a session that would start in auto mode starts indefaultinstead; it does not reject--permission-mode autoas the description claimed.allowManagedPermissionRulesOnly: the description omitted local and--settingsfiles,--allowedTools, hiding always-allow choices, and no longer saving new rules.parentSettingsBehavior: covers any embedding host including IDE extensions, not just the SDK, and"merge"applies host settings through a restrictive-only filter.fallbackModel: does not merge across settings files — the highest-precedence file supplies the whole chain.availableModels: a managed list applies exclusively and is never merged with lower scopes.enableArtifact: Scope isAny file; the claim that it is ignored in project and local settings was wrong.disableArtifact: now documented as deprecated in favour ofenableArtifact.managedMcpServers: also deliverable through a Claude apps gateway policy'sdesktopblock (gateway needs v2.1.232+).CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH: default 1 → 3 since v2.1.219.CLAUDE_CODE_SYNC_SKILLS: skills download to~/.claude/skills/synced/since v2.1.227.forceLoginMethod/forceLoginOrgUUID/forceLoginGatewayUrl: documented scope restrictions, including that only a managed source enforces rather than pre-selects.ANTHROPIC_CUSTOM_HEADERS: invalid-character failure behaviour (v2.1.227).CLAUDE_CODE_RETRY_WATCHDOG: fails immediately on a 429 reporting a spend limit or exhausted usage credits (v2.1.239).UNDOCUMENTED prefixes dropped (4)
Setup,DirectoryAdded,autoMode.classifyAllShellandsandbox.network.strictAllowlistare all now documented; three of the four were marked UNDOCUMENTED by me in #6131 and the docs have since caught up.Links
Audited all 161 top-level properties. 65 links migrated to
settings-referenceanchors, and 13 properties plus 13 hook events that carried no doc link at all now have one — every top-level property is now linked. Every migrated anchor was verified present in the page source; nested keys use hyphens for dots (#worktree-baseref,#attribution-sessionurl).94 properties keep a feature-page link rather than
settings-reference, even though 92 of them now also have a settings-reference section, because the feature page is usually the more specific home (sandbox→sandboxing,processWrapper→corporate-launcher). OnlymanagedMcpServersandrequireCoworkFullVmSandboxhave no settings-reference section at all, consistent with them living solely on feature pages.permissionRulenow points at permissions#permission-rule-syntax, which holds the full rule syntax.Separately, 8 links pointed at anchors that no longer exist on their page. A docs page returns 200 whether or not the fragment resolves, so a reachability check never caught them:
alwaysThinkingEnabled→model-config#extended-thinking;allowedMcpServersanddeniedMcpServers→managed-mcp#policy-based-control-with-allowlists-and-denylists;FORCE_PROMPT_CACHING_5M→prompt-caching#choose-the-ttl-yourself; andsandbox.enabled,sandbox.failIfUnavailable,sandbox.filesystem.allowWrite,sandbox.filesystem.allowRead→ their per-keysettings-referenceanchors. Every anchored link in the schema now resolves to a real heading or id.Keybindings
chat:queueSubmit— documented, requires v2.1.247.DiffPanelcontext andapp:cycleDiffBase— UNDOCUMENTED. Both are present in the v2.1.251 generated defaults (ctrl+x bin theDiffPanelcontext) but appear on no documentation page and in no changelog entry.DiffPanelis distinct from the documentedDiffDialogcontext, which the schema already carried. ThebuiltinActionandcontextenums are flat string arrays sharing one description, so there is no per-value place to record theUNDOCUMENTED.marker used elsewhere in this schema.Tests
modern-complete-config.json: all 23 new properties with non-default values, plus a fullsandbox.credentialsmasking configuration exercisingmask,extract,decode/maskClaims,maskDuplicates,injectHosts,awsPairsandsigv4.env-variables.json: all 39 new environment variables.enum-coverage.json,edge-cases.json,basic-config.json,complete-config.json,managed-settings.json,permissions-advanced.json: the remaining enum values and non-default values needed to satisfy the coverage gate's enum and default-value checks.permissions-advanced.jsonalso coversmode: "deny"and thewarn/deny/errorvariants ofonExtractNoMatch.marketplace-host-pattern.json,managed-settings.json: Azure DevOps marketplace URLs without a.gitsuffix, carried over from feat(claude-code-settings): allow git marketplace URLs without .git suffix #5874.claude-code-keybindings/all-contexts.json,current-actions.json: theDiffPanelcontext and both new actions.Negative tests
invalid-enum-values.json: invalid values for the new settings and environment-variable enums, and forsandbox.credentialsmode,onExtractNoMatchand all threesigv4keys.invalid-blocked-marketplace-git-url.jsonandinvalid-marketplace-host-pattern.json, which asserted that a missing.gitsuffix is invalid — carried over from feat(claude-code-settings): allow git marketplace URLs without .git suffix #5874.invalid-enum-values.jsonthat relied on the removed environment variables were dropped. A negative test file fails as long as any one property is invalid, so leaving them would have left silently inert assertions behind.Skipped
modelPickerandspinnerTipsOverride'stipsFile/label— covered by @GeneralD's open PR feat(claude-code-settings): add modelPicker, spinnerTipsOverride tipsFile/label #6266, which is recent and passing CI. I independently verifiedmodelPicker's shape as correct and deliberately left both out so that PR lands on its own merit. I have commented there about three documented numeric/length bounds it is missing.permissionRuleinto separateallowanddenypatterns (proposed in claude-code-settings: add missing documented tools to permissionRule pattern #6236) — the right idea, but restrictingallowto the 14 permission-required tools would remove 16 names that validate today, includingRead, which appears in this schema's ownexamplesand is the subject of fix(claude-code-settings): allow wildcard-only args like Read(*) and Skill(*) #5707. The docs do not sayallowrejects a no-permission tool, only that such a rule has no effect. Deferred rather than tightened on an argument from silence.CLAUDE_CODE_MESSAGING_SOCKET,CLAUDE_CODE_MESSAGING_TOKEN,CLAUDE_CODE_PROJECT_DIR_NAME,CLAUDE_CODE_RESTRICTED— documented, but each states it is never read from a settings file'senvblock, so they do not belong in$.env.properties.enabledPlugins— settings-reference documents only the Boolean map form, but the schema'sanyOfalso accepts an array of strings. Narrowing on absence of documentation risks rejecting a live legacy shape.CLAUDE_CODE_SUBAGENT_MODELprecedence — the v2.1.251 changelog says it now sets a default rather than overriding everything, but env-vars.md and sub-agents.md both still document the old resolution order. Left matching the docs.proxyAuthHelper— appears in settings-reference'smanagedSourcesBehaviormerge-rules table but has no section of its own, so there is no type or description to cite.🤖 Generated with Claude Code