Tutorials · Claude Agent SDK · examples / outputs / 21_sandbox_and_stderr.txtExample code

Example code · outputs

21_sandbox_and_stderr.txt

Captured output of 21_sandbox_and_stderr

Raw fileDownload all examples (zip)See the script →

=== sandbox enabled, failIfUnavailable=True ===
ResultError raised: Claude Code returned an error result: Sandbox required but unavailable: sandbox is enabled but dependencies are missing: bubblewrap (bwrap) not installed, socat not installed · install missing tools (e.g. apt install bubblewrap socat) or see https://code.claude.com/docs/en/sandboxing. Set sandbox.failIfUnavailable=false to allow unsandboxed execution. (exit code: 1)
stderr lines mentioning sandbox (2):
    Error: sandbox required but unavailable: sandbox is enabled but dependencies are missing: bubblewrap (bwrap) not installed, socat not installed · install missin
    sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

=== sandbox enabled, failIfUnavailable=False (fall back unsandboxed, warn) ===
result: subtype=success terminal_reason='completed' errors=None
result text: 'sandbox-test'
stderr lines mentioning sandbox (2):
    ⚠ Sandbox disabled: sandbox is enabled but dependencies are missing: bubblewrap (bwrap) not installed, socat not installed · install missing tools (e.g. apt ins
    Commands will run WITHOUT sandboxing. Network and filesystem restrictions will NOT be enforced.

14 lines · Back to the folder