[BUG] Sideload-flag rejection happens before server-managed settings refresh — machines stay stuck on a stale policy the admin already rolled back
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet (#80763 covers
disableSideloadFlagsbreaking Desktop Local Sessions; this report is about the recovery path being impossible after the admin rolls the flag back) - [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
When disableSideloadFlags is delivered via server-managed settings (claude.ai Admin Settings → Claude Code, Team plan) and later removed by the admin, machines that cached the old policy never pick up the rollback if their only Claude Code launches carry a sideload flag.
Order of operations at startup appears to be:
- CLI validates argv against the cached policy in
~/.claude/remote-settings.json --plugin-dirpresent + cacheddisableSideloadFlags: true→ exit code 1- The remote-settings refetch that would replace the cache with the corrected policy never runs on this path
The Claude Desktop app always spawns the CLI with --plugin-dir (bundled integrations + locally installed plugins — see #80763), so an affected desktop-app user is in a permanent crash loop the org admin cannot remotely undo: the server policy is fixed, but every launch fails against the stale cache and never refreshes it.
Reproduction
- Org deploys server-managed settings containing
"disableSideloadFlags": true; client fetches and caches it in~/.claude/remote-settings.json - Admin removes the key in the console (verified served: a plain
clauderun on another machine fetches the corrected policy) - On the affected machine run
claude --plugin-dir ./x -p "hi"→ rejected with "--plugin-dir is disabled by your organization's managed settings (disableSideloadFlags)" - Inspect
~/.claude/remote-settings.json→ still containsdisableSideloadFlags: true; repeat step 3 any number of times — never recovers - Run plain
claude -p "hi"once → cache refreshes to the corrected policy → step 3 now succeeds
Also reproducible by hand-editing disableSideloadFlags: true into the cache file: the failed flagged run leaves the edit in place; a plain run replaces it.
Expected Behavior
Either refresh (or attempt to refresh) server-managed settings before enforcing sideload-flag policy, or treat a flag rejection as a trigger to refetch so the next launch sees the current policy. Without one of these, any org that ever ships disableSideloadFlags risks stranding its desktop-app users with no remote remediation.
Workarounds (for anyone else hitting this)
rm ~/.claude/remote-settings.json, then relaunch (cache re-downloads on next successful start), or- run plain
claudeonce in a terminal and exit
Environment
- Claude Code 2.1.224, macOS (Darwin 25.x)
- Policy delivered via claude.ai server-managed settings (Team plan), org OAuth login
- Desktop app + CLI both affected; desktop app has no flag-free launch path so it never self-heals
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗