Skip to content

fix: refresh Claude live config after common updates during takeover#339

Open
mydelren wants to merge 1 commit into
SaladDay:mainfrom
mydelren:fix/claude-common-config-takeover-refresh
Open

fix: refresh Claude live config after common updates during takeover#339
mydelren wants to merge 1 commit into
SaladDay:mainfrom
mydelren:fix/claude-common-config-takeover-refresh

Conversation

@mydelren

Copy link
Copy Markdown

Summary

  • refresh active Claude live settings after common-config updates while takeover is already active
  • build the takeover backup snapshot from the in-flight common-config snippet instead of reloading the old stored snippet
  • add a regression test covering common-config updates during active Claude takeover

Problem

When Claude takeover is already active, updating Claude common config can persist the snippet in cc-switch while leaving the active live config stale.

In practice this means fields like statusLine (or simpler env keys) can exist in Claude common config but never appear in ~/.claude/settings.json until some later operation rewrites live config.

Root cause addressed here

The takeover-active post-commit path used ProxyLiveBackup and saved a refreshed backup snapshot, but it did not refresh the active Claude live config. It also rebuilt backup state from the stored common snippet instead of the in-flight snippet being applied by the current operation.

This patch:

  1. passes the current common-config snippet through the takeover backup snapshot path
  2. refreshes active Claude live config after saving the takeover backup snapshot

Verification

Already verified locally before preparing this PR:

  • cargo build --lib
  • targeted integration test for the new regression case
  • takeover + common_config related test selection
  • full lib test suite
  • full provider_commands integration tests

Regression coverage

Added:

  • updating_claude_common_config_under_takeover_refreshes_active_live_settings

Issue

Closes #338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude common config updates do not refresh active live config during takeover

1 participant