[BUG] /config auto-compact toggle does not persist to config file

Resolved 💬 3 comments Opened Jan 12, 2026 by heatingp Closed Jan 16, 2026

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

  1. Run /config in Claude Code
  2. Toggle "Auto-compact" to false
  3. Toggle it back to true
  4. Check ~/.claude.json - the autoCompactEnabled field is missing
  5. 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

  1. Open Claude Code in VSCode
  2. Run /config command
  3. Find "Auto-compact" toggle and set it to false
  4. Set it back to true
  5. Close and reopen Claude Code
  6. Check ~/.claude.json - the autoCompactEnabled field is missing
  7. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗