[BUG] managed-settings sandbox.enabled: true causes all Bash tool output to be empty on macOS
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
- Create
/Library/Application Support/ClaudeCode/managed-settings.jsonwith sandbox enabled:
{
"permissions": {
"ask": ["Bash(*)"],
"allow": ["Bash(ls*)", "Bash(find*)", "Bash(echo*)"]
},
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": false
}
}
- Start a new Claude Code session
- Run any Bash command (e.g.,
echo hello,pwd,ls) - 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗