Feature Request: Add a formal `description` field for comments in `settings.json`
Title: Feature Request: Add a formal description field for comments in settings.json
Body:
Problem:
The settings.json file is powerful, but because JSON doesn't support comments, it's hard to document why a configuration exists. This makes it difficult for teams to maintain complex settings for hooks, permissions, and other features.
Currently, we use unofficial keys like _comment, which works because the parser ignores them, but it's not a standardized or discoverable solution.
Proposed Solution:
I propose adding an official, optional description key that can be added to any object within settings.json.
This pattern already exists within Claude Code. As documented in en/docs/claude-code/slash-commands/index, custom slash commands use a description field in their YAML frontmatter for this exact purpose.
Adopting the same description key for settings.json would create a consistent and predictable developer experience across all configuration files. The Claude Code parser would be updated to recognize and ignore this key, treating it purely as a documentation field.
Example Usage:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Task",
"description": "Validates the JSON output from a sub-agent against our protocol schema.",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/validate_agent_output.sh"
}
]
}
]
},
"permissions": {
"description": "Allowlist essential CI commands but block all network access.",
"allow": ["Bash(npm run test:*)"],
"deny": ["WebFetch"]
}
}
Benefits:
This small change would greatly improve the maintainability and clarity of shared configurations. Most importantly, it would align settings.json with existing configuration patterns in Claude Code, making the entire tool more consistent and intuitive for teams to manage.
Or better yet, support jsonc extension
hey @coygeek and Anthropic team, could you please add support for jsonc extension?
The implementation should be super easy but the benefit would be big - my settings.json file has grown quite large and I would very much appreciate the ability to use comments to explain my settings!
Adding support for jsonc would greatly help in reviewing and sharing settings files.
I built a plugin that solves this: claude-settings-manager
It lets you maintain __settings.jsonc (with full comment support) and auto-generates settings.json via git hooks.
Features:
- Full JSONC support (// and /* */ comments)
- Auto-sync on commit via lefthook/husky
- Blocks direct edits to settings.json to prevent drift
- AI-powered error explanations when validation fails
- Works with regular projects, chezmoi dotfiles, or stow
Not a replacement for native support, but a working solution until then.
I've also rolled my own solution which is a little more advanced than @bengous's manager - sharing in case anyone finds it useful:
- I isolate each section of the
settings.jsoninto a separate*.jsonc, file, e.g.,settings/hooks.jsonc - I run this
merge_settings.shbash script for merging all JSONs intosettings.json - I use
lint-stagedto run the merge script upon every commit in my.clauderepo
Link: https://github.com/PaulRBerg/dot-claude
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Please keep open and add support for jsonc
Definitely would appreciate this, especially as settings.json files grow more complex
Created a dedicated issue for JSONC support as an alternative approach: #17968
Hey everyone, following up on my previous request. I’ve been keeping an eye on the daily documentation updates at code.claude.com, and I wanted to share what I found in the latest version (as of Jan 16, 2026).
It looks like this has been partially implemented, specifically for Hooks and Plugins, but it hasn't yet been formalized as a global field for all objects (like Permissions).
What’s been updated:
In the new Hooks Reference (docs/en/hooks.md), there is a new section for Plugin Hooks that explicitly mentions this:
"Plugin hooks use the same format as regular hooks with an optional
descriptionfield to explain the hook's purpose."
The documentation even includes an example of a hook object using the key:
{
"description": "Automatic code formatting",
"hooks": {
"PostToolUse": [ ... ]
}
}
What’s still missing:
While it's great to see description appearing in the hooks and plugin schemas, it hasn't been added to the official Settings reference (docs/en/settings.md) yet.
- The Available Settings table for
settings.jsonstill doesn't listdescriptionas a supported top-level key. - The Permission Settings table still only lists
allow,ask,deny, etc., without a formal description field.
Summary: We're halfway there! The parser clearly supports description for hooks now, which is a huge win for maintaining complex automation. I'm hoping to see the team extend this to the permissions object and other areas of settings.json to match the consistency of the custom slash command YAML frontmatter.
I'll leave this issue open until it's officially supported across the entire settings.json schema!
Created a dedicated issue for JSONC support as an alternative approach: #17968
Supporting comments fully is much better solution than "description" tag: faster edits (commenting, uncommenting, writing new explanatory comments) + user can use what he is used to from other json settings files (most of which support comments).
Created a dedicated issue for JSONC support as an alternative approach: #17968
Supporting comments fully is much better solution than "description" tag: faster edits (commenting, uncommenting, writing new explanatory comments) + user can use what he is used to from other json settings files (most of which support comments).
Yes, agreed: if we had to choose only one, comments are better, but a description is also useful (and does have some benefits comments lack). They are different things with slightly overlapping benefits. Claude Code absolutely hallucinated in closing as duplicates the requests for JSONC syntax (perhaps due to StackOverflow training data, where careless users with lots of points would regularly close unanswered questions with only a vague resemblance to an answered question).