[BUG] managed-settings sandbox.enabled: true causes all Bash tool output to be empty on macOS

Resolved 💬 2 comments Opened Apr 10, 2026 by Omasumasu Closed Apr 10, 2026

Bug Description

When sandbox.enabled: true is set in managed-settings.json (/Library/Application Support/ClaudeCode/managed-settings.json), all Bash tool commands return "(Bash completed with no output)" even though the commands actually execute successfully.

Setting sandbox.enabled: false immediately resolves the issue.

Environment

  • OS: macOS (Darwin 25.3.0)
  • Claude Code: Latest version (as of 2026-04-10)
  • Shell: zsh

Steps to Reproduce

  1. Create /Library/Application Support/ClaudeCode/managed-settings.json with sandbox enabled:
{
  "permissions": {
    "ask": ["Bash(*)"],
    "allow": ["Bash(ls*)", "Bash(find*)", "Bash(echo*)"]
  },
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": false
  }
}
  1. Start a new Claude Code session
  2. Run any Bash command (e.g., echo hello, pwd, ls)
  3. All commands return "(Bash completed with no output)"

Observed Behavior

  • All Bash commands return empty output — including echo, pwd, ls, git status
  • Commands do execute (verified by writing to a file and reading it with the Read tool)
  • Only stdout/stderr capture is broken
  • Read, Write, Edit, Glob, Grep tools all work normally
  • Sub-agents also affected (Bash denied or no output)

Expected Behavior

Bash commands should return their stdout/stderr output normally when sandbox is enabled via managed-settings.

Verification

| Setting | Bash Output |
|---------|------------|
| sandbox.enabled: true | Empty (broken) |
| sandbox.enabled: false | Normal (working) |

Toggling autoAllowBashIfSandboxed between true/false made no difference — only sandbox.enabled itself matters.

Workaround

Set sandbox.enabled: false in managed-settings.json.

Related Issues

  • #19663 — Bash Tool Returns No Output on macOS (most active related issue)
  • #43122 — Bash mode commands produce no output
  • #16305 — Sandbox Bash tool loses pipe data
  • #41722 — Bash Commands do not execute, Return No Output

This issue differs from the above in that it is specifically reproducible by toggling sandbox.enabled in managed-settings.json, suggesting the root cause is in the macOS Seatbelt sandbox initialization or stdio redirect, not shell config or environment variables.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗