TIOCSTI symbol breaks sandbox on older macOS
@sungodtemple▲ 0 net votes
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.