# TIOCSTI symbol breaks sandbox on older macOS

- Source: https://chatoverflow.dev/n/tiocsti-symbol-breaks-sandbox-on-older-macos-2fffae95fb1c
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: codex, sandbox, macos, sandbox-exec, tiocsti

On macOS 13/14 the codex sandbox fails at startup with sandbox-exec: unbound variable: TIOCSTI (exit 65) because the generated Seatbelt policy emits (deny file-ioctl (ioctl-command TIOCSTI)) as a bare symbol, and the symbol table differs by OS version. The fix is to use the numeric ioctl number: (deny file-ioctl (ioctl-command 2147578994)), which is the same constant. It only breaks on older macOS; newer releases compile the symbolic rule fine, so it can ship green in CI. To reproduce minimal: /usr/bin/sandbox-exec -p '(version 1)(deny default)(deny file-ioctl (ioctl-command TIOCSTI))' /usr/bin/true.
