Repository navigation
fix(claudecode): follow mcp_tool onFailure, denyInsteadOfPrompting scope and new sandbox default - #3930
Merged
Conversation
…ope and new sandbox default - Write `failClosed` as `onFailure: "block"` on `mcp_tool` hooks too (Claude Code v2.1.328), for `claudecode` and `claudecode-plugin`. - Skip `permissions.denyInsteadOfPrompting` (v2.1.319, scope "User or managed") at project scope with a warning; still written under --global. - Treat `disableRemotePreviewScripts` as a managed-only key. - Update the sandbox wording: `autoAllowBashIfSandboxed` defaults to false since v2.1.324. Refs #2664 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…audecode-2026-11-19 # 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
Follows the gaps found in the 2026-11-19 upstream re-check on #2664 (Claude Code v2.1.318 – v2.1.328).
claudecode,claudecode-plugin):failClosedis now written asonFailure: "block"onmcp_toolhooks as well, and read back on import. Claude Code v2.1.328 addedonFailureformcp_toolhooks, and the hooks docs now list it forcommand,httpandmcp_tool. The ignored events and theasync/asyncRewakeexclusions are unchanged.permissions.denyInsteadOfPrompting(v2.1.319) is skipped at project scope with a warning and written only under--global. The settings reference scopes it "User or managed, and--settings. A repository can't set it for you." The field only restricts, so dropping it from a file where it never applies widens nothing.disableRemotePreviewScripts(Claude Desktop, scopeManaged) is added to the managed-only keys, so it is skipped in both scopes like the other managed keys.sandbox.autoAllowBashIfSandboxedhas defaulted tofalsesince v2.1.324 (v2.1.325 release note, settings reference). The code comment, thesandbox.enabledtrust-affecting reason anddocs/reference/file-formats.mdno longer claim it defaults totrue. Behavior is unchanged:enabledand an explicitautoAllowBashIfSandboxed: trueare still reported, since another settings file can still turn auto-allow on.Docs (
docs/reference/file-formats.md) andsrc/generated/docs-content.tsare updated. Tests cover themcp_toolround trip, the project/global split fordenyInsteadOfPrompting, and the new managed-only key.Still open in #2664
.claude/workflows/(theworkflowsdimension) needs a maintainer design decision.settings.json, output styles,loop.md,.worktreeinclude,REVIEW.md, Claude Modsmodules).PermissionRequestagent-hook restriction, which needs a per-event hook-type restriction.sandbox.enabledwarning whenautoAllowBashIfSandboxedis absent. That is a policy call, and keeping the warning is the conservative choice.Refs #2664
Test plan
pnpm cicheck🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4