[BUG] /config auto-compact toggle does not persist to config file
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?
Bug Description
The auto-compact toggle in /config UI does not persist the setting to the config file (~/.claude.json).
After setting auto-compact to false and then back to true, the autoCompactEnabled field is missing from ~/.claude.json entirely, and the feature stops working.
Steps to Reproduce
- Run
/configin Claude Code - Toggle "Auto-compact" to
false - Toggle it back to
true - Check
~/.claude.json- theautoCompactEnabledfield is missing - Auto-compact no longer triggers at 75-80% context usage
Expected Behavior
The autoCompactEnabled setting should be persisted to ~/.claude.json when changed via /config.
Workaround
Manually add "autoCompactEnabled": true to ~/.claude.json.
Environment
- Claude Code version: 2.1.5
- Platform: macOS (darwin-arm64)
- Interface: VSCode Extension
What Should Happen?
When toggling auto-compact to true in /config, the setting should be persisted to ~/.claude.json and auto-compaction should trigger automatically when context usage reaches ~75-80%.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code in VSCode
- Run
/configcommand - Find "Auto-compact" toggle and set it to
false - Set it back to
true - Close and reopen Claude Code
- Check
~/.claude.json- theautoCompactEnabledfield is missing - Auto-compact no longer triggers when context reaches 75-80%
Workaround: Manually add "autoCompactEnabled": true to ~/.claude.json
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.5
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗