Skip to content

feat(claude-code): update settings schema to match v2.1.81#5483

Open
r-johnv wants to merge 6 commits intoSchemaStore:masterfrom
r-johnv:feat/update-claude-code-settings-schema
Open

feat(claude-code): update settings schema to match v2.1.81#5483
r-johnv wants to merge 6 commits intoSchemaStore:masterfrom
r-johnv:feat/update-claude-code-settings-schema

Conversation

@r-johnv
Copy link
Copy Markdown

@r-johnv r-johnv commented Mar 22, 2026

Summary

  • Add 27 missing top-level properties to the Claude Code settings schema
  • Add 4 missing hook events: PostCompact, StopFailure, Elicitation, ElicitationResult
  • Add missing hook command fields: shell, once, asyncRewake
  • Add "auto" to permissions.defaultMode enum and disableAutoMode sub-property
  • Add missing sandbox sub-properties: ripgrep, filesystem.allowRead, filesystem.allowManagedReadPathsOnly
  • Add pluginConfigs.*.options sub-property
  • Update test file to cover all new properties

Source of truth: Zod schema extracted from the installed @anthropic-ai/claude-code@2.1.81 npm package.

5 properties present in the existing schema were not found in the Zod source (showTurnDuration, skippedMarketplaces, skippedPlugins, teammateMode, terminalProgressBarEnabled). These were left intact as they may be handled elsewhere in the codebase or represent valid user-facing settings not captured by the core Zod validation schema.

Closes issue #5484

This would likely supersede PR #5467.

Test plan

  • Schema JSON parses correctly
  • node cli.js check --schema-name claude-code-settings.json passes
  • Prettier formatting applied
  • Positive test file (modern-complete-config.json) updated with all new properties
  • CI passes

Add 27 missing top-level properties, 4 missing hook events
(PostCompact, StopFailure, Elicitation, ElicitationResult),
new hook command fields (shell, once, asyncRewake), and missing
sub-properties for sandbox, permissions, and pluginConfigs.

Source of truth: Zod schema extracted from the installed
@anthropic-ai/claude-code@2.1.81 npm package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the PR!

This section of the codebase is owned by @domdomegg, @bogini, and @ant-kurt - if they write a comment saying "LGTM" then it will be merged.

- Add descriptions to sandbox.ripgrep.command and sandbox.ripgrep.args
- Add positive test for uncovered enum values (auto, powershell, chat, disable)
- Add negative test for enum fields missing negative coverage
- Fix collectValuesByPath to handle $defs paths via deep name-based fallback
Copy link
Copy Markdown
Contributor

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@domdomegg
Copy link
Copy Markdown
Contributor

LGTM

@github-actions
Copy link
Copy Markdown
Contributor

Sorry @domdomegg, you don't have access to these files:

Copy link
Copy Markdown
Contributor

@miteshashar miteshashar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sincere apologies, I couldnt desloppify the comment enough. Plus now, I can see there are ample points missed by my review. Since I dont see an option to delete the comment, I have removed the content of it.

@hyperupcall
Copy link
Copy Markdown
Member

I've merged #5552 so not being owner of coverage.js should no longer be a blocker. I tried to get my Claude to resolved the merge conflicts, but some other validation issues remain I'll leave the rest up to y'all.

miteshashar added a commit to miteshashar/schemastore that referenced this pull request Apr 17, 2026
Subsumes open PRs SchemaStore#5483 and SchemaStore#5583 (credited; coverage.js changes
deferred to a separate follow-up PR).

Schema:
- Add hookCommand fields: asyncRewake (command-only), shell (command-only,
  enum bash|powershell), if (filter on tool-related events). Omit `once`
  since docs scope it to skill frontmatter, not settings.json.
- Add hook events: StopFailure (API-error matcher values documented)
- Add 17 top-level properties: agent, allowedChannelPlugins, autoMemoryDirectory,
  autoMode (with allow/soft_deny/environment classifier customization),
  channelsEnabled, defaultShell, disableDeepLinkRegistration,
  disableSkillShellExecution, forceRemoteSettingsRefresh, minimumVersion,
  showClearContextOnPlanAccept, showThinkingSummaries,
  skipDangerousModePermissionPrompt, strictPluginOnlyCustomization, tui,
  useAutoModeDuringPlan, viewMode, voiceEnabled
- Add permissions.disableAutoMode (nested, mirrors disableBypassPermissionsMode)
- Add sandbox.network.allowMachLookup (macOS XPC/Mach service allowlist)
- Add sandbox.ripgrep custom-binary configuration
- Add statusLine.refreshInterval (min 1)
- Add pluginConfigs.*.options (non-sensitive plugin userConfig values)
- Extend effortLevel enum with xhigh (Opus 4.7) and max
- Extend permissionRule pattern with Monitor and PowerShell tools
- Tighten cleanupPeriodDays minimum from 0 to 1 (v2.1.89 validator rejects 0)
- Fix stale doc anchors: hooks-guide#filter-hooks-with-matchers,
  hooks#http-hook-fields, memory#exclude-specific-claude-md-files,
  tools-reference (canonical page for tool list)

Tests:
- modern-complete-config.json: cover all new properties
- complete-config.json: cover effortLevel medium and viewMode default
- edge-cases.json: update cleanupPeriodDays 0 -> 1
- New enum-coverage.json: cover alternate enum values (bash, fullscreen,
  xhigh, verbose) for full positive coverage across new enums

Negative tests:
- invalid-enum-values.json: add invalid values for defaultShell,
  disableDeepLinkRegistration, permissions.disableAutoMode, tui, viewMode
- New invalid-hook-shell.json: exercise hookCommand.shell invalid enum

Excluded:
- coverage.js \$defs-path fix from SchemaStore#5483 (scheduled for a separate PR
  crediting @r-johnv). Consequence: the #\$defs/hookCommand.shell enum
  coverage gate fails here; will be resolved when that PR lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
miteshashar added a commit to miteshashar/schemastore that referenced this pull request Apr 17, 2026
Path-based traversal in collectValuesByPath cannot match $defs paths
(e.g., "#$defs/hookCommand.shell") against test data because the path
references the schema definition, not the test structure. Adds a deep
name-based search fallback for the terminal property name so test files
exercising the property via $ref usage are still matched.

Included from SchemaStore#5483 by @r-johnv to extend the coverage gate so this
sync PR can land without skipping the #\$defs/hookCommand.shell check.

Co-Authored-By: Rohit John Varghese <rohit@contoro.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants