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.
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Or better yet, support
jsoncextensionhey @coygeek and Anthropic team, could you please add support for
jsoncextension?The implementation should be super easy but the benefit would be big - my
settings.jsonfile 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-generatessettings.jsonvia git hooks.Features:
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:
settings.jsoninto a separate*.jsonc, file, e.g.,settings/hooks.jsoncmerge_settings.shbash script for merging all JSONs intosettings.jsonlint-stagedto run the merge script upon every commit in my.clauderepoLink: 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
jsoncDefinitely would appreciate this, especially as
settings.jsonfiles grow more complexCreated 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:The documentation even includes an example of a hook object using the key:
What’s still missing:
While it's great to see
descriptionappearing in the hooks and plugin schemas, it hasn't been added to the official Settings reference (docs/en/settings.md) yet.settings.jsonstill doesn't listdescriptionas a supported top-level key.allow,ask,deny, etc., without a formal description field.Summary: We're halfway there! The parser clearly supports
descriptionfor hooks now, which is a huge win for maintaining complex automation. I'm hoping to see the team extend this to thepermissionsobject and other areas ofsettings.jsonto 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.jsonschema!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).