Fall back to local settings when sudo is unavailable - #561
Merged
Conversation
rohita5l
approved these changes
Sep 11, 2026
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.
Summary
Fixes #554
Testing
uv run ruff check .uv run pytest tests/test_managed_files.py tests/test_agent_claude.py tests/test_agent_codex.py -q(218 passed)uv run pytest -q(2205 passed, 42 skipped, 2 environment-dependent installed-client integration failures)The two full-suite failures are
TestClaudeUserAgent::test_user_agent_arrives_at_gatewayandTestCodexUserAgent::test_user_agent_arrives_at_gateway; both reproduce on an untouchedmaincheckout with the locally installed agent versions.Docker test without sudo access
Tested both versions in the same container as a non-root
ugtestuser that was not present in sudoers:~/.claude/ucode-settings.json, left/etc/claude-code/managed-settings.jsonabsent, and succeeded.origin/main: the Claude configuration path exited with status 1 andRuntimeError: Claude Code cannot start because ucode could not update /etc/claude-code/managed-settings.json.These Docker checks directly exercised the configuration-writing paths under identical no-sudo conditions. They did not perform a fully authenticated end-to-end agent launch, which requires Databricks workspace credentials and installed Claude/Codex clients.