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
Termux: $PREFIX/bin/hermes wrapper shebang #!/usr/bin/env bash does not work #45321
On Termux (Android), the wrapper script at $PREFIX/bin/hermes uses #!/usr/bin/env bash as its shebang. However, /usr/bin/env on Termux is a symlink to the multi-call binary coreutils:
$ ls -la /data/data/com.termux/files/usr/bin/env
lrwxrwxrwx 1 u0_a382 u0_a382 9 May 30 15:10 env -> coreutils
The kernel cannot resolve this symlink as a shebang interpreter, resulting in:
$ hermes --version
bash: /data/data/com.termux/files/usr/bin/hermes: /usr/bin/env: bad interpreter: No such file or directory
Note: calling /usr/bin/env directly from bash works fine — the issue is specifically with kernel-level shebang processing.
Fix
Replace the shebang with the direct bash path:
#!/data/data/com.termux/files/usr/bin/bash
or generically use $PREFIX/bin/bash which Termux maps to the correct path.
Root Cause
The Hermes installer (setup-hermes.sh) generates the wrapper script but does not account for Termux's filesystem structure where /usr/bin/env is a multi-call binary symlink rather than a standalone executable.
One PR directly addresses #45321. #45324 changes the generated Termux launcher from /usr/bin/env bash to the kernel-resolvable $PREFIX/bin/bash while preserving the existing shebang for non-Termux installs, and adds a regression test around the production shim-write block.
Related pull requests
fix(termux): use direct bash path in launcher shim #45324best fix — (+42/-1) — fixes: The diff conditionally emits #!$PREFIX/bin/bash only when DISTRO=termux and PREFIX is set, directly resolving the reported kernel shebang failure without changing non-Termux behavior. The added test executes the extracted production shim-write block and verifies the resulting Termux shebang; this agrees with the contributor keep_open review, which found the patch focused, current, and mechanically salvageable.
Suggested consolidation
Merge #45324 — it is the verified best fix, directly addresses the reported root cause with a narrowly scoped platform condition, preserves existing behavior elsewhere, and includes targeted regression coverage. There are no competing PRs to close as duplicates.
Complex graph
flowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I45321(["issue #45321 (open)"])
P45324["PR #45324 (open)"]
P45324 -->|best fix| I45321
class I45321 open
class I45321 target
class P45324 open
class P45324 best
click I45321 "https://github.com/NousResearch/hermes-agent/issues/45321"
click P45324 "https://github.com/NousResearch/hermes-agent/pull/45324"
Loading
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).
Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 2 kB of PR diffs, 2 kB of issue/PR text, 1 kB of discussion (2 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Activity
GottZ commentedon Jul 25, 2026
Summary
One PR directly addresses #45321. #45324 changes the generated Termux launcher from
/usr/bin/env bashto the kernel-resolvable$PREFIX/bin/bashwhile preserving the existing shebang for non-Termux installs, and adds a regression test around the production shim-write block.Related pull requests
best fix— (+42/-1) — fixes: The diff conditionally emits#!$PREFIX/bin/bashonly whenDISTRO=termuxandPREFIXis set, directly resolving the reported kernel shebang failure without changing non-Termux behavior. The added test executes the extracted production shim-write block and verifies the resulting Termux shebang; this agrees with the contributor keep_open review, which found the patch focused, current, and mechanically salvageable.Suggested consolidation
Merge #45324 — it is the verified best fix, directly addresses the reported root cause with a narrowly scoped platform condition, preserves existing behavior elsewhere, and includes targeted regression coverage. There are no competing PRs to close as duplicates.
Complex graph
flowchart LR classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937 classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151 classDef best stroke-width:3px,stroke:#b45309 classDef target stroke-width:3px,stroke:#4338ca I45321(["issue #45321 (open)"]) P45324["PR #45324 (open)"] P45324 -->|best fix| I45321 class I45321 open class I45321 target class P45324 open class P45324 best click I45321 "https://github.com/NousResearch/hermes-agent/issues/45321" click P45324 "https://github.com/NousResearch/hermes-agent/pull/45324"Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).
Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 2 kB of PR diffs, 2 kB of issue/PR text, 1 kB of discussion (2 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.