[BUG] Network requests outside of sandbox don't trigger PermissionRequest hook https://github.com/anthropics/claude-code/issues/23217

Resolved 💬 3 comments Opened Apr 1, 2026 by sowensupgrade Closed Apr 4, 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?

If I tell Claude to use sandboxed bash to do something which triggers a network request outside of the sandbox, I get a permission prompt. Any PermissionRequest hook I have for this does not get called.

What Should Happen?

The PermissionRequest hook should be triggered so it has a chance to auto-approve or deny network requests without user intervention.

Error Messages/Logs

Steps to Reproduce

Clone repro at https://github.com/fongandrew/claude-sandbox-network-request. This just has a PermissionRequest hook that spits out a log file.
Run Claude Code there
Tell Claude Code to "use sandboxed bash to curl example.com"
Wait until permission request pops up
Check file system to see no log file appears
If you try the same thing with "use unsandboxed bash to curl example.com", it should generate the log file though.

Claude Model

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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