[FEATURE] Separate runtime state from configuration to support home directory managers (e.g., `alwaysThinkingEnabled`)

Resolved 💬 3 comments Opened Dec 13, 2025 by mkobit Closed Dec 14, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I manage my development environment configuration using dotfile management tools (chezmoi). Currently, Claude Code writes runtime state changes directly to the primary configuration file (~/.claude/settings.json).

When Claude modifies this file during a session (for example, adding or updating keys like alwaysThinkingEnabled after a user toggles a setting), it creates a conflict between the local file system and the version control template. This causes "configuration drift," meaning the dotfile manager views the file as modified/dirty. This results in sync failures or requires manual conflict resolution every time the application is used.

Mixing declarative user configuration with dynamic runtime state makes it difficult to maintain a reproducible environment across multiple machines.

Proposed Solution

Please explicitly separate all user-defined configuration from runtime state, not just some of it.

Alternative Solutions

Alternatives I am using now are to force overwrite using chezmoi either via flag or during interactive application. Another workaround is to compute the file state from its existing state, but that is more complex and error prone.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

  1. I initialize a new machine and sync my dotfiles to install ~/.claude/settings.json (containing my preferred theme and default verbose settings).
  2. I start claude and, during the session, I disable a feature or change a setting that persists to disk.
  3. Claude updates ~/.claude/settings.json with this new state.
  4. Later, I update a different setting in my dotfiles repository (e.g., changing the theme) and attempt to sync/apply the changes to my machine.
  5. Result: The sync tool fails or pauses because the local settings.json has diverged from the source of truth due to the runtime edits, requiring me to manually diff and merge the JSON files.

Additional Context

Potentially adopting the XDG Base Directory specification(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) would naturally solve this by placing user config in $XDG_CONFIG_HOME (e.g., ~/.config/claude/) and application state in $XDG_STATE_HOME (e.g., ~/.local/state/claude/), and Claude code can resolve the end state in a more intuitive way.

View original on GitHub ↗

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