[AIGTWY-4290] Reconcile OS managed settings on workspace switch - #392
Open
david-siqi-liu wants to merge 1 commit into
Open
[AIGTWY-4290] Reconcile OS managed settings on workspace switch#392david-siqi-liu wants to merge 1 commit into
david-siqi-liu wants to merge 1 commit into
Conversation
david-siqi-liu
marked this pull request as ready for review
August 25, 2026 21:35
david-siqi-liu
force-pushed
the
david-l_data/AIGTWY-4290
branch
2 times, most recently
from
August 26, 2026 16:37
a758171 to
5be0791
Compare
…obal settings ucode's write into an agent's OS-level managed file (under use_as_global_settings) had no inverse: switching to a workspace whose managed config drops global settings left the prior workspace's config applying to a bare `claude`/`codex`. - managed_files: capture each OS file's pre-ucode state into a machine-global ledger on first write, and add restore_managed_file to put it back (or remove a file ucode created). Drift-suppressed and nonfatal, mirroring the reviewer-preferred "back up and restore the original" over selective key pruning. - agents: reconcile_global_settings undoes the write for every global-settings agent the current config no longer marks global (both agents, whichever one launches). - cli: reconcile on launch, on configure (incl. the early-return managed branch), and on bare `ucode` before its no-config early return. Co-authored-by: Isaac <no-reply@databricks.com>
david-siqi-liu
force-pushed
the
david-l_data/AIGTWY-4290
branch
from
August 26, 2026 17:43
5be0791 to
8cd2104
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the OS-managed-file lifecycle gap from #319: when a workspace publishes a managed coding-agent config with use_as_global_settings=true, ucode writes the agent's root-owned OS managed file (Claude: /etc/claude-code/managed-settings.json, Codex: /etc/codex/managed_config.toml). There was no inverse path, so switching to a workspace with no managed config (or one that drops global settings) left the prior workspace's config applying to a bare claude/codex.
What changed:
Design: this mirrors the reviewer-preferred approach on the #319 threads (save the original and restore it, rather than selectively pruning ucode's keys), which preserves unrelated IT-authored settings.
Known limitations (deliberately out of scope for this ticket):
Test plan:
This pull request and its description were written by Isaac.