Skip to content

Make managed settings synchronization explicit - #436

Open
anthonyivn2 wants to merge 1 commit into
databricks:mainfrom
anthonyivn2:feat/optional-managed-settings-sync
Open

Make managed settings synchronization explicit#436
anthonyivn2 wants to merge 1 commit into
databricks:mainfrom
anthonyivn2:feat/optional-managed-settings-sync

Conversation

@anthonyivn2

@anthonyivn2 anthonyivn2 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Make OS-managed configuration synchronization explicit and optional for Claude Code and Codex.

  • Configure Claude Code and Codex locally by default.
  • Add ucode configure --sync-managed-settings for intentional machine-wide synchronization.
  • Keep ucode claude and ucode codex launches read-only with respect to OS-managed settings.
  • Restore only managed settings previously written by ucode when returning to local-only configuration or running ucode revert.
  • Preserve compatible or externally modified administrator-managed files.
  • Show managed synchronization and local-only behavior in the TUI, README, and design documentation.

ucode configure behavior after this PR

Plain configuration

ucode configure and ucode configure --agents ... configure selected agents locally.

For Claude Code and Codex, they:

  • do not create or update OS-managed settings;
  • do not request administrator access solely for managed settings;
  • attempt to restore managed changes previously made by ucode;
  • warn when restoration cannot be completed, without making later launch commands retry elevation.

Explicit managed synchronization

ucode configure --sync-managed-settings keeps the normal agent picker and synchronizes OS-managed settings only for selected agents that support it: Claude Code and Codex.

  • Selecting Claude Code synchronizes its OS-managed settings.
  • Selecting Codex synchronizes /etc/codex/managed_config.toml on macOS and the platform-specific managed path elsewhere.
  • Selecting Claude Code and Codex synchronizes both.
  • Mixed selections synchronize only the supported selected agents.
  • Selecting no supported agent reports an error before agent installation or configuration writes.
  • The TUI announces each OS-managed settings path being configured.

Because these settings are machine-wide, they can also affect Claude Code or Codex launched outside ucode, including editor extensions.

Launch validation

ucode claude and ucode codex validate higher-precedence OS-managed settings but never write them or request elevation.

Managed file state Launch behavior
File absent Continue with ucode's local settings
Compatible external file Continue without modifying the file
Conflicting external file Report the conflict and stop
Ucode-owned compatible file Continue
Ucode-owned file modified externally Preserve it and report the conflict

Cleanup and restoration

A later plain ucode configure or ucode revert restores only changes recorded as ucode-owned. Administrator changes made after synchronization are not overwritten. If restoration requires unavailable administrator access, ucode reports incomplete cleanup rather than causing ordinary launch commands to request elevation.

Validation

  • Managed-settings focused tests: 634 passed.
  • Ruff checks and changed-file formatting pass.
  • Manual testing with ucode + claude / codex

Signed-off-by: Anthony Ivan <anthony.ivan@databricks.com>
@anthonyivn2
anthonyivn2 force-pushed the feat/optional-managed-settings-sync branch from 75fcbfa to 55a69b5 Compare September 2, 2026 00:04
@anthonyivn2
anthonyivn2 marked this pull request as ready for review September 2, 2026 00:04
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.

1 participant