feat(claude-code-settings): add four undocumented settings keys - #6352
johnjspiteri wants to merge 2 commits into
Conversation
Add promptSuggestionEnabled, skipWorkflowUsageWarning, precomputeCompactionEnabled and modelProposedGoals. All four are read by the Claude Code CLI but absent from this schema. None appear in the published settings documentation, so each carries the UNDOCUMENTED. description prefix per CONTRIBUTING.md.
|
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. |
`node ./cli.js coverage` requires every property to appear in a positive test, every enum value to be exercised, a non-default value tested alongside the default, and a negative test for invalid enum input. Covers all three modelProposedGoals values across basic-config (auto), enum-coverage (alwaysAsk) and complete-config (disabled), with "sometimes" added to the negative enum test. Booleans are tested at both values.
|
Pushed a follow-up commit adding test coverage for the four keys. I had initially only run Now covered:
One note in case it is useful for other contributors: the two pre-existing prettier warnings under |
Adds four settings keys that the Claude Code CLI reads but this schema does not declare.
Verified against Claude Code 2.1.236. Each key is declared in the binary's own embedded zod settings schema with a
.describe()string, and the descriptions below are taken from there rather than inferred from usage:promptSuggestionEnabledpromptSuggestionEnabled: z.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled.")skipWorkflowUsageWarningskipWorkflowUsageWarning: z.boolean().optional().describe("@internal Whether the user has accepted the multi-agent workflow usage warning. Until set, auto permission mode prompts before running a workflow.")precomputeCompactionEnabledprecomputeCompactionEnabled: z.boolean().optional().describe("Precompute the compaction summary in the background before it is needed. Only applies when auto-compact is on.")modelProposedGoalsmodelProposedGoals: z.enum(["auto", "alwaysAsk", "disabled"]).optional().catch(undefined).describe("@internal Controls the ProposeGoal tool ...")None of the four appears on https://code.claude.com/docs/en/settings, so each description carries the
UNDOCUMENTED.prefix per the Undocumented Features section ofCONTRIBUTING.md.A note on the two
@internalkeys: they are marked internal in the binary, but both are user-facing in practice.precomputeCompactionEnabledis exposed in/configunder Experimental, andskipWorkflowUsageWarningis persisted tosettings.jsonwhen a user accepts the workflow warning dialog — so both show up in real config files and currently validate as unknown keys.I deliberately excluded a fifth candidate,
copyOnSelect. It is read ascopyOnSelect ?? trueand appears in the/configUI, but I could not find a zod declaration for it in the settings schema, so I could not confirm it is a settings key rather than state held elsewhere. Happy to add it in a follow-up if a maintainer can confirm.Validation:
node ./cli.js check --schema-name=claude-code-settings.jsonpasses (pre-checks and Ajv).npx prettier --checkpasses.Context: the Claude Code settings documentation points to this schema as "the published JSON schema" while noting that it "can lag behind the newest CLI releases". I have opened anthropics/claude-code#94232 upstream asking Anthropic to publish a schema generated from the CLI's own validation source, which would make this kind of manual backfill unnecessary.