Repository navigation
fix(permissions): skip enforceAnthropicSignIn and four env variables Claude Code ignores - #3962
Merged
Merged
Conversation
…Claude Code ignores - Treat enforceAnthropicSignIn (v2.1.329+, scope Managed) as managed-only, so it is skipped with a warning in both scopes. - Skip OTEL_RESOURCE_INCLUDE_HOST (v2.1.326+) and CLAUDE_CODE_EXPERIMENTAL_CODE_MODE at project scope; user settings (--global) still honor them. - Skip CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT and CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK in every settings file, since Claude Code reads them from the launch environment only. - Update the claudecode env notes in docs/reference/file-formats.md. Refs #2664 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…audecode-managed-env # Conflicts: # src/generated/docs-content.ts
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
Closes the two gaps in the 2026-11-25 upstream re-check on #2664. Both are in the Claude Code permissions generator (
src/features/permissions/claudecode-permissions.ts).What changed
enforceAnthropicSignInis managed-only. The settings reference gives its scope asManaged(Claude Code v2.1.329+), and Claude Code reads it only from a managed settings file or an MDM policy. It is now in the managed-only key map, so rulesync skips it in both scopes and prints the existing per-key warning. Before this change it was written to.claude/settings.jsonand~/.claude/settings.json, where Claude Code does not read it.envfilter, following the list of variables Claude Code ignores inenv:OTEL_RESOURCE_INCLUDE_HOST(v2.1.326+, part of the telemetry group) andCLAUDE_CODE_EXPERIMENTAL_CODE_MODEare skipped at project scope. Code Mode reads this variable only from the shell, user settings or a--settingsfile, so a project value does nothing, a0included. Both are still written under--global, because user settings honor them.CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPTandCLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECKare skipped in every settings file, because Claude Code reads them from the launch environment only.claudecodeenv notes indocs/reference/file-formats.mdandsrc/generated/docs-content.tsare updated to match.Skipped
enforceAnthropicSignInis not added to theManagedexamples indocs/reference/file-formats.md. That list gives a few examples and then..., so it was left as is..claude/workflows/, thescheduled-taskskills path, plugin LSP/monitors/settings.json, output styles,loop.md, per-event hook-type limits and thesandbox.enabledwarning.Refs #2664
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4