[BUG] phantom setting.json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
● # Claude Code v2.0.76 Settings Cache Bug
## Summary
Claude Code continues to show errors for settings in /root/topstocks/.claude/settings.local.json even though:
- The file was deleted completely
- The directory was deleted completely
- The global settings file
/root/.config/Claude/settings.jsonwas cleaned
## Reproduction Steps
- Start with malformed settings in
/root/topstocks/.claude/settings.local.json - Delete the entire
.claudedirectory:rm -rf /root/topstocks/.claude - Verify it's gone:
ls -la /root/topstocks/.claude(should show "No such file") - Run
claudefrom/root/topstocks - BUG: Still shows error about
/root/topstocks/.claude/settings.local.jsoncontaining DIARY content
## Expected Behavior
Should either:
- Not complain about a file that doesn't exist
- Use global settings from
/root/.config/Claude/settings.json - Create a fresh settings file
## Actual Behavior
Shows error about malformed content in a file that doesn't exist on disk
## Version
claude --version
2.0.76
## Workaround Attempted
- Deleted all
.claudedirectories - Cleaned global settings in
/root/.config/Claude/settings.json - Killed all claude processes
- Cleared caches in
~/.cache/ - None worked - still shows same cached error
## Verification Files Don't Exist
```bash
# Verify local settings don't exist
$ ls -la /root/topstocks/.claude
ls: cannot access '/root/topstocks/.claude': No such file or directory
# Verify global settings are clean
$ grep -c "DIARY" /root/.config/Claude/settings.json
0
Impact
Unable to use Claude Code in /root/topstocks directory due to phantom cached settings error.
Security Implications to Add:
This is a permissions caching bug which means Claude Code might be:
- Executing commands with stale/outdated permission rules
- Allowing commands that have been revoked from settings
- Blocking commands that have been granted in settings
This makes the settings system unreliable for security purposes since the actual permissions on disk don't match what Claude Code enforces.
What Should Happen?
find the cause and correct
Error Messages/Logs
Steps to Reproduce
not sure
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗