Skip to content

fix(tirith): detect Termux and skip binary spawn gracefully - #26282

Closed
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/tirith-termux-fallback
Closed

fix(tirith): detect Termux and skip binary spawn gracefully#26282
ygd58 wants to merge 1 commit into
NousResearch:mainfrom
ygd58:fix/tirith-termux-fallback

Conversation

@ygd58

@ygd58 ygd58 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Problem

On Termux (Android), the tirith binary is dynamically linked against /lib/ld-linux-aarch64.so.1 which does not exist under Bionic libc. The binary file exists but spawn fails with ENOENT.

Fix

  • Detect Termux via PREFIX env var or TERMUX_VERSION
  • Return None from _get_platform_triple() to skip binary download/spawn
  • Log a helpful debug message with proot-distro guidance instead of WARNING

Fixes #26275

On Termux (Android), the tirith binary is dynamically linked against
/lib/ld-linux-aarch64.so.1 which does not exist under Bionic libc.
The binary file exists but subprocess.run() fails with ENOENT because
the ELF interpreter cannot be found (issue NousResearch#26275).

Fix:
- _get_platform_triple() detects Termux via PREFIX env var or
  TERMUX_VERSION and returns None to skip binary download/spawn
- When tirith_path is None on Termux, log a debug message with
  guidance (use proot-distro Ubuntu) instead of a WARNING

Fixes NousResearch#26275
@ygd58
ygd58 force-pushed the fix/tirith-termux-fallback branch from acba8bf to f08ea96 Compare May 15, 2026 10:23
@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have labels May 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #26281 which has the same Termux detection fix but with a dedicated _is_termux_native() helper, 7 regression tests, and a distinct termux_native_unsupported reason tag from _install_tirith(). Recommend reviewing #26281 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: tirith spawn failed: [Errno 2] No such file or directory on Termux (Android)

2 participants