Skip to content

fix(claudecode): follow mcp_tool onFailure, denyInsteadOfPrompting scope and new sandbox default - #3930

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2664-claudecode-2026-11-19
Nov 22, 2026
Merged

dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2664-claudecode-2026-11-19

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Follows the gaps found in the 2026-11-19 upstream re-check on #2664 (Claude Code v2.1.318 – v2.1.328).

  • hooks (claudecode, claudecode-plugin): failClosed is now written as onFailure: "block" on mcp_tool hooks as well, and read back on import. Claude Code v2.1.328 added onFailure for mcp_tool hooks, and the hooks docs now list it for command, http and mcp_tool. The ignored events and the async / asyncRewake exclusions are unchanged.
  • permissions (project scope): 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.
  • permissions: disableRemotePreviewScripts (Claude Desktop, scope Managed) is added to the managed-only keys, so it is skipped in both scopes like the other managed keys.
  • permissions (wording only): sandbox.autoAllowBashIfSandboxed has defaulted to false since v2.1.324 (v2.1.325 release note, settings reference). The code comment, the sandbox.enabled trust-affecting reason and docs/reference/file-formats.md no longer claim it defaults to true. Behavior is unchanged: enabled and an explicit autoAllowBashIfSandboxed: true are still reported, since another settings file can still turn auto-allow on.

Docs (docs/reference/file-formats.md) and src/generated/docs-content.ts are updated. Tests cover the mcp_tool round trip, the project/global split for denyInsteadOfPrompting, and the new managed-only key.

Still open in #2664

  • .claude/workflows/ (the workflows dimension) needs a maintainer design decision.
  • Gap E and the other new surfaces (plugin LSP servers and monitors, plugin settings.json, output styles, loop.md, .worktreeinclude, REVIEW.md, Claude Mods modules).
  • The PermissionRequest agent-hook restriction, which needs a per-event hook-type restriction.
  • Not done here: dropping the sandbox.enabled warning when autoAllowBashIfSandboxed is 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

dyoshikawa and others added 2 commits November 22, 2026 17:25
…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
@dyoshikawa
dyoshikawa merged commit 1ea4573 into main Nov 22, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2664-claudecode-2026-11-19 branch November 22, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant