Skip to content

feat(claude-code-settings): add missing top-level keys - #6309

Open
zachmayer wants to merge 1 commit into
SchemaStore:masterfrom
zachmayer:claude-code-settings-missing-keys
Open

feat(claude-code-settings): add missing top-level keys#6309
zachmayer wants to merge 1 commit into
SchemaStore:masterfrom
zachmayer:claude-code-settings-missing-keys

Conversation

@zachmayer

Copy link
Copy Markdown

Five settings that Claude Code reads are missing from claude-code-settings.json. The schema's top-level additionalProperties is true, so today they validate silently: editors offer no completion for them, and strict validation can't be turned on for a settings file that uses them.

All five are documented in the Claude Code settings reference and are referenced by the Claude Code 2.1.261 binary.

Key Type Default Docs
autoContinueAtUsageLimit boolean true https://code.claude.com/docs/en/settings-reference#autocontinueatusagelimit
crossSessionInbound string enum: accept, hold, refuse unset https://code.claude.com/docs/en/settings-reference#crosssessioninbound
enableWorkflows boolean unset https://code.claude.com/docs/en/settings-reference#enableworkflows
promptSuggestionEnabled boolean true https://code.claude.com/docs/en/settings-reference#promptsuggestionenabled
switchModelsOnFlag boolean true https://code.claude.com/docs/en/settings-reference#switchmodelsonflag

The crossSessionInbound values come from https://code.claude.com/docs/en/cross-session-messaging#control-inbound-messages.

Descriptions follow the conventions already in this file: enum values explained inline in the description (as in autoUpdatesChannel) rather than via non-standard enumDescriptions, with a trailing docs URL. default is set only where the docs state one; enableWorkflows and crossSessionInbound are documented as unset by default, so neither gets a default.

Tests

  • src/test/claude-code-settings/modern-complete-config.json — all five keys
  • src/test/claude-code-settings/enum-coverage.jsoncrossSessionInbound: "hold"
  • src/test/claude-code-settings/managed-settings.jsoncrossSessionInbound: "refuse", matching the managed-settings example in the docs

Together with "accept" in modern-complete-config.json, all three enum values are exercised.

Negative tests:

  • src/negative_test/claude-code-settings/invalid-enum-values.jsoncrossSessionInbound: "maybe"
  • src/negative_test/claude-code-settings/wrong-property-types.json — a non-boolean for each of the four booleans

Checks run

npm clean-install
node ./cli.js check --schema-name=claude-code-settings.json   # pre-checks + Ajv validation pass
node ./cli.js coverage --schema-name=claude-code-settings.json # 8 passed, 0 failed, 0 warned
npm run prettier                                               # all matched files use Prettier code style
npm run typecheck
npm run eslint

I also compiled the schema with Ajv directly and asserted each new constraint bites: the three valid crossSessionInbound values validate, "maybe" does not, and each boolean rejects a non-boolean. 12/12 as expected.

pre-commit was not run locally; the only hooks are Prettier (run above via npm run prettier) and codespell, which I ran over the changed files with no findings.

Five settings that Claude Code reads are absent from the schema. Because
the top-level `additionalProperties` is `true` they validate silently, so
editors offer no completion for them and strict validation is impossible.

- autoContinueAtUsageLimit (boolean, default true)
- crossSessionInbound (string enum: accept, hold, refuse)
- enableWorkflows (boolean)
- promptSuggestionEnabled (boolean, default true)
- switchModelsOnFlag (boolean, default true)

All five are documented in the Claude Code settings reference and present
in the Claude Code 2.1.261 binary. Descriptions follow the existing style
in this file: enum values explained inline, plus a docs URL.

Positive tests cover the new keys in modern-complete-config.json, all
three crossSessionInbound values across enum-coverage.json,
managed-settings.json and modern-complete-config.json; negative tests
cover a bad enum value and wrong types for each boolean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWZwpQFkxFBNJPikDWmos1
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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.

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.

1 participant