You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: TUI hangs silently when /tmp is mounted noexec (dlopen of libopentui.so fails) #26136
/tmp on my machine is mounted with noexec (Ubuntu corporate hardening — CIS-style fstab line with nosuid,nodev,noexec). When I run opencode, the TUI hangs forever. Nothing visible. With --print-logs --log-level DEBUG the cause shows up:
ERROR ... service=default e=Failed to initialize OpenTUI render library: Failed to open library "/tmp/.f9ef37f75ffbafff-00000001.so": /tmp/.f9ef37f75ffbafff-00000001.so: failed to map segment from shared object rejection
Bun unpacks libopentui.so into $TMPDIR (defaults to /tmp) and then dlopens it. With noexec, mmap can't grant exec perms on the segments, so dlopen fails. The TUI catches the error but never produces user-visible output, hence the silent hang.
opencode run "..." works because it doesn't load the TUI shared library.
#5175 covered the same problem and was auto-closed after 90 days of inactivity; maintainer comment there says to open a new issue if still relevant. Same root cause as #3765, #4605, #6080.
Workaround that works today:
BUN_TMPDIR=$HOME/.cache/opencode-tmp opencode
Plugins
none
OpenCode version
1.14.40
Steps to reproduce
add tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0 to /etc/fstab and reboot (or any Lynis/CIS hardening that does this)
confirm with findmnt /tmp -no OPTIONS (should contain noexec)
run opencode
hangs with no prompt
Operating System
Ubuntu 24.04 LTS, kernel 6.17
Terminal
GNOME Terminal (also reproduces in tmux, alacritty, plain TTY)
Activity
kommander commentedon May 11, 2026
Setting
BUN_TMPDIRto an executable dir is currently the only way I am afraid. That is a bun issue.