opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Regression] v1.1.21 OpenTUI fails to initialize in Termux/PRoot (ARM64): "Permission denied" on /proc/self/fd

Open tered12114-bot opened this issue 2 days ago • 3 comments

Description

What happened? After updating from v1.1.20 to v1.1.21, OpenCode fails to start the TUI interface in a Termux PRoot environment (running Ubuntu via proot-distro on Android ARM64).

The process hangs or exits immediately. Using --print-logs reveals a critical error in the new OpenTUI render library. It appears v1.1.21 attempts to load shared libraries via memfd_create referenced through /proc/self/fd/, which is intercepted and restricted by PRoot, causing a "Permission denied" error.

Key Findings:

  1. Regression: Version 1.1.20 works perfectly in the same environment.
  2. Workaround: Downgrading to 1.1.20 resolves the issue immediately.
  3. Failed Fixes: Cleaning ~/.cache/opencode, ~/.local/share/opencode, and attempting to set L2S_DLOPEN_TMPDIR or TMPDIR to a physical directory did not resolve the issue.

Error Logs:

INFO  2026-01-15T05:55:13 +290ms service=default version=1.1.21 args=["--print-logs"] opencode
ERROR 2026-01-15T05:55:13 +112ms service=default e=Failed to initialize OpenTUI render library: Failed to open library "/proc/self/fd/19": /proc/self/fd/19: cannot open shared object file: Permission denied rejection
ERROR 2026-01-15T05:55:13 +0ms service=default Error: Failed to initialize OpenTUI render library: Failed to open library "/proc/self/fd/19": /proc/self/fd/19: cannot open shared object file: Permission denied

Environment:

  • OS: Android (Termux)
  • Environment: PRoot container (Debian)
  • Architecture: aarch64 (ARM64)
  • Package Manager: pnpm / bun

Plugins

@opencode-ai/plugin, opencode-anthropic-auth (Core plugins)

OpenCode version

1.1.21 (Issue present), 1.1.20 (Last working version)

Steps to reproduce

  1. Set up a Termux environment on Android.
  2. Install a PRoot distro (e.g., proot-distro install debian).
  3. Login to PRoot (proot-distro login ubuntu).
  4. Install the latest OpenCode: pnpm add -g [email protected].
  5. Run opencode.
  6. Observation: The TUI does not render. Running opencode --print-logs shows the /proc/self/fd permission denied error.

Screenshot and/or share link

No response

Operating System

Android (Termux) running debian via proot-distro (aarch64)

Terminal

Termux

tered12114-bot avatar Jan 15 '26 07:01 tered12114-bot