anthropics / anthropics/claude-code
C:/Program Files/Git/config cannot clear a key it wrote - no way to revert to the inherited value
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
## Summary
`/config` writes a setting into a settings file, but it has no item that removes
the key again. After `/config` has written a key to `.claude/settings.local.json`,
you can only select a different value. You cannot return the project to the state
where it inherits the value from `~/.claude/settings.json`.
## Steps to reproduce
1. Set a user-level default. In `~/.claude/settings.json`:
`"outputStyle": "ASD-STE100"`.
2. In a project, run `/config` and select a different output style. Claude Code
writes the key to that project's `.claude/settings.local.json`.
3. Try to return the project to the inherited user-level value with `/config`.
## Expected
The menu has an item that clears the key, for example "Inherit" or "Use user
setting". The project then follows `~/.claude/settings.json` again.
## Actual
The only available route is to select an explicit value. Selecting the built-in
default writes `"outputStyle": "default"`. That is a different state: project
local settings have a higher precedence than user settings, so the project is now
pinned to `default`, and it no longer follows the user-level value. The only way
out is a manual edit of `.claude/settings.local.json` to delete the line.
## Why this matters
- The pinned value masks a later change to the user-level default. The user gets
no signal.
- The `/config` UI shows the same thing for both states: key absent, and key set
to `default`. The user cannot see that the project is pinned.
- The documentation presents `/config` as a supported way to change a setting, so
the hand edit is a workaround outside the documented interface.
The example above uses `outputStyle`, but the gap applies to every key that
`/config` writes.
## Environment
- Claude Code 2.1.276
- Windows 11
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the `/config` entry point and how it writes `.claude/settings.local.json` relative to `~/.claude/settings.json`. Add a way to remove a locally written key so the project inherits the user setting again, and verify that the UI distinguishes inheritance from an explicit default value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100