Android ARM64 (Termux): launcher resolves linux-arm64 binary but npm rejects optional dependency (EBADPLATFORM)

Open
#37,262 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js
Domain
build-system, cli

Research direction

Reproduce the failure with the listed npm install and codex commands on Android/Termux, then inspect the launcher’s explicit Android case and the @openai/codex-linux-arm64 optional dependency metadata. Determine whether Android/Termux is supported; done means either the package installs and codex launches, or the installer and launcher clearly report that the platform is unsupported.

Written by the indexing model from the issue text.

Description

bug CLI
What version of Codex CLI is running?

0.146.1

What subscription do you have?

ChatGPT Plus

Which model were you using?

N/A (CLI does not start)

What platform is your computer?

Android arm64 $ uname -mprs aarch64 aarch64 Android

What terminal emulator and version are you using (if applicable)?

Termux Node.js 26.3.1 npm 12.0.2

Codex doctor report
Not available.

The CLI exits before it can execute any commands due to a missing optional dependency.
What issue are you seeing?

Installing Codex succeeds:

npm install -g @openai/codex@latest

However, running:

codex

fails with:

Error: Missing optional dependency @openai/codex-linux-arm64.
Reinstall Codex: npm install -g @openai/codex@latest

I investigated further.

Node reports:

node -p "process.platform"
android
node -p "process.arch"
arm64

The launcher contains an explicit Android platform case:

case "android":

and maps Android to the target triple:

aarch64-unknown-linux-musl

which resolves to the package:

@openai/codex-linux-arm64

However, that optional dependency is never installed.

What steps can reproduce the bug?
  1. Install Termux on Android (arm64).
  2. Install Node.js and npm.
  3. Run:
npm install -g @openai/codex@latest
  1. Execute:
codex

The CLI exits immediately with:

Missing optional dependency @openai/codex-linux-arm64

Further investigation shows:

npm install -g npm:@openai/codex@0.146.1-linux-arm64

fails with:

EBADPLATFORM

wanted:
os: linux
cpu: arm64

current:
os: android
cpu: arm64
What is the expected behavior?

Either:

  1. Android/Termux is supported, in which case the required platform package should be installable and the CLI should launch successfully.

or

  1. Android/Termux is intentionally unsupported, in which case the installer or launcher should provide a clear "unsupported platform" message instead of reporting a missing optional dependency.
Additional information

The launcher appears to recognize Android:

case "android":

and maps it to the Linux ARM64 target.

However, npm refuses to install the corresponding optional dependency because it is published with:

os: linux
cpu: arm64

while Node on Termux reports:

process.platform = "android"
process.arch = "arm64"

This appears to create a mismatch where the launcher expects the Linux ARM64 package but npm never installs it due to platform metadata.

I'm not certain whether Android/Termux is intended to be supported, but the current behavior seems inconsistent because the launcher explicitly handles the Android platform while the dependency metadata prevents the required binary from being installed.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.