Repository navigation
fix(setup): stop reading the user's unloaded settings.local.json in configured() - #2002
Merged
Merged
Conversation
…onfigured() Claude Code loads a settings.local.json only from a project's .claude/, so sandbox.enabled in the home directory's copy sandboxes nothing, yet configured() counted it and reported an unsandboxed machine as configured. Read only ~/.claude/settings.json at user scope, reversing apache#1763. isolated-setup-verify check 6 now reports the setting found only there, and the complete-upgrade read, docs, specs and evals follow. Generated-by: Claude Opus 5
potiuk
enabled auto-merge (squash)
November 5, 2026 01:52
This was referenced Nov 5, 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
setup_preflight.isolated.configured()countedsandbox.enabledin~/.claude/settings.local.json. Claude Code loads asettings.local.jsononly from a project's.claude/, so that value sandboxes nothing and the check reported an unsandboxed machine as configured.configured()now reads only~/.claude/settings.jsonat user scope. This reverses fix(setup): read the user's settings.local.json when checking for the isolated setup #1763, which added the read to match the status line; fix(agent-isolation): stop the status line reading ~/.claude/settings.local.json #1971 already removed it from the status line.isolated-setup-verifycheck 6 drops the file from its walk and reports ✗ when the sandbox is enabled only there, with the move-it remedy inremediation.md, so the affected user gets a cause rather than only the banner. Thecomplete-upgradeout-of-sandbox read drops it too.secure-agent-setup.mdand thesandbox-diagnosticsandadoption-and-setupspecs follow.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)setup_preflightpackage shipped in themagpie-setuppluginTest plan
prek run --all-files: every hook passes except workspacepytest, where 4 tests intools/agent-isolation/tests/test_gpg_touch_overlay.pyfail locally; this PR does not touch that codeprek run --files <changed files>passesuv run --project tools/setup-preflight pytest tools/setup-preflight/tests: 439 passedtest_a_sandbox_only_in_the_user_settings_local_is_not_configuredfails without the fixsetup-complete-upgradeevals: 18 of 18 passsetup-isolated-setup-verifyevals: 38 of 39 pass in the final full run, including the newcase-25-sandbox-only-in-unloaded-fileand the fixedcase-23.case-7failed on grader wording aboutSSH_AUTH_SOCKand passed on rerun alone. All runs are in the journalsRFC-AI-0004 compliance
configured()reads one file fewerLinked issues
Refs #1763, #1971
Notes for reviewers (optional)
case-23listed the gateway hooks in~/.claude/settings.local.jsonand expected check 12a to pass, which contradicts check 12a itself, so the fixture now lists them in~/.claude/settings.json.configured()still returns early on a non-emptyisolated_setupstamp, before it reads any settings, so a machine with a stamp reports configured whatever its settings say. It also ORs project and user scope, so a projectenabled: falsedoes not override a usertrue, and in a linked worktree it reads the worktree's settings rather than the main checkout's. All three are older than this PR and left for separate changes.🤖 Generated with Claude Code