When a command fails in the sandbox, the agent may retry it with dangerouslyDisableSandbox. Set sandbox.allowUnsandboxedCommands to false to ignore the parameter, or add an ask rule so every retry prompts. In managed settings this makes the sandbox admin required, so a repository cannot loosen it.
Read in this order
- OfficialThe escape hatch (Claude Code sandboxing docs)Shows who approves a retry in each mode and the strict sandbox settings.
- OfficialSettings reference (Claude Code docs)Defines sandbox.allowUnsandboxedCommands and related sandbox settings.