[BUG] Sandbox allowLocalBinding: true not applied to child/grandchild processes (breaks Gradle)
Resolved 💬 1 comment Opened Jan 16, 2026 by kkyr Closed Feb 10, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Gradle builds fail in sandbox mode because the Gradle daemon (a forked JVM process) cannot bind to TCP localhost, even when allowLocalBinding: true is configured.
What Should Happen?
Gradle daemon should be able to bind to localhost TCP port for IPC.
Error Messages/Logs
Actual Behavior:
java.net.SocketException: Operation not permitted
at sun.nio.ch.Net.bind0(Native Method)
at TcpIncomingConnector.accept()
Steps to Reproduce
Steps to Reproduce:
- Configure sandbox with:
{
"sandbox": {
"network": {
"allowLocalBinding": true
}
}
}
- Run any Gradle build:
./gradlew build
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.7 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Root Cause Hypothesis:
The allowLocalBinding permission applies to the direct child process (./gradlew), but Gradle forks a separate JVM daemon process. This grandchild process doesn't appear to inherit sandbox permissions.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗