Receber por email
← Voltar para o catálogo

sandbox-first

Use when a Bash command fails in the sandbox, or when considering whether to use dangerouslyDisableSandbox. Guides sandbox-first execution and sandbox config diagnosis.

10estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add technicalpickles/pickled-claude-plugins

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/sandbox-first/svg)](https://www.skillteca.com.br/skills/sandbox-first)
#ai

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Sandbox-First Execution

Core Rule

Always run Bash commands sandboxed first. Never set dangerouslyDisableSandbox: true unless a sandboxed attempt has already failed in this session, or the command is listed in skip_failure_requirement (see Configured Exceptions below).

When a Sandboxed Command Fails

Before retrying with dangerouslyDisableSandbox:

  1. Read the error. What specifically failed?
  2. Is it a sandbox restriction? Look for:
  3. "Operation not permitted" (filesystem write outside allowed paths)
  4. "Connection refused" or network timeouts (host not in allowedHosts)
  5. "Permission denied" on paths outside the project
  6. macOS Mach port / XPC denial — crash containing bootstrap_check_in

and "Permission denied (1100)". The surface error looks like an application crash (e.g. Chromium Check failed: kr == KERN_SUCCESS), but the root cause is seatbelt denying mach-register/mach-lookup for a service. Seen with Playwright launching headless Chromium, and applies to other multi-process macOS tools (Electron, Puppeteer, etc.). Sandbox config cannot grant Mach port access, so this genuinely requires dangerouslyDisableSandbox.

  1. Suggest a config fix. Tell the user what to add to ~/.claude/settings.json:
  2. Network: add host to sandbox.network.allowedHosts
  3. Filesystem: add path to sandbox.filesystem.allowWrite
  4. If retrying unsandboxed, explain what restriction was hit and why the sandbox

config change would be the better long-term fix.

Configured Exceptions

Some commands are known to always fail in the sandbox (e.g. docker, colima ssh). These can be configured in ~/.claude/sandbox-first.json or .claude/sandbox-first.json under the skip_failure_requirement key. The enforcement hook will allow dangerouslyDisableSandbox: true for these commands without requiring a prior sandboxed failure.

What NOT to Do

  • Do not preemptively use dangerouslyDisableSandbox because you think a command

"might" fail in the sandbox. Try it first.

  • Do not silently retry unsandboxed after a sandbox failure. Always surface what happened.
  • Do not use dangerouslyDisableSandbox for convenience. It exists for cases where the

sandbox genuinely cannot support the operation.

Compartilhar X LinkedIn