From 268267b59e9c3c6ce91849f76cec9c41ded26fc9 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 9 Jul 2025 14:08:35 -0700 Subject: [PATCH 1/3] fix: the `completion` subcommand should assume the CLI is named `codex`, not `codex-cli` (#1496) Current 0.4.0 release: ``` ~/code/codex2/codex-rs$ codex completion | head _codex-cli() { local i cur prev opts cmd COMPREPLY=() if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then cur="$2" else cur="${COMP_WORDS[COMP_CWORD]}" fi prev="$3" cmd="" ``` with this change: ``` ~/code/codex2/codex-rs$ just codex completion | head cargo run --bin codex -- "$@" Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.82s Running `target/debug/codex completion` _codex() { local i cur prev opts cmd COMPREPLY=() if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then cur="$2" else cur="${COMP_WORDS[COMP_CWORD]}" fi prev="$3" cmd="" ``` --- codex-rs/cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 51a089d4b9..153af99fce 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -155,6 +155,6 @@ fn prepend_config_flags( fn print_completion(cmd: CompletionCommand) { let mut app = MultitoolCli::command(); - let name = app.get_name().to_string(); + let name = "codex"; generate(cmd.shell, &mut app, name, &mut std::io::stdout()); } From 3a23a86f4b34291889e9a07e840bec2fcb63fa63 Mon Sep 17 00:00:00 2001 From: pchuri Date: Thu, 10 Jul 2025 14:06:55 +0900 Subject: [PATCH 2/3] Add Android platform support for Codex CLI (#1488) ## Summary Add Android platform support to Codex CLI ## What? - Added `android` to the list of supported platforms in `codex-cli/bin/codex.js` - Treats Android as Linux for binary compatibility ## Why? - Fixes "Unsupported platform: android (arm64)" error on Termux - Enables Codex CLI usage on Android devices via Termux - Improves platform compatibility without affecting other platforms ## How? - Modified the platform detection switch statement to include `case "android":` - Android falls through to the same logic as Linux, using appropriate ARM64 binaries - Minimal change with no breaking effects on existing functionality ## Testing - Tested on Android/Termux environment - Verified the fix resolves the platform detection error - Confirmed no impact on other platforms ## Related Issues Fixes the "Unsupported platform: android (arm64)" error reported by Termux users --- codex-cli/bin/codex.js | 1 + 1 file changed, 1 insertion(+) diff --git a/codex-cli/bin/codex.js b/codex-cli/bin/codex.js index 45a597b271..54b99078e4 100755 --- a/codex-cli/bin/codex.js +++ b/codex-cli/bin/codex.js @@ -41,6 +41,7 @@ if (wantsNative) { let targetTriple = null; switch (platform) { case "linux": + case "android": switch (arch) { case "x64": targetTriple = "x86_64-unknown-linux-musl"; From c6e4a65e2af0c71792881216b70d37980e5adc42 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 10 Jul 2025 10:59:42 -0700 Subject: [PATCH 3/3] fix: remove reference to /compact until it is implemented --- codex-rs/tui/src/bottom_pane/chat_composer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index cd8e9fa17f..a00f4eecfa 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -94,7 +94,7 @@ impl ChatComposer<'_> { format!("{BASE_PLACEHOLDER_TEXT} — {percent_remaining}% context left") } else { format!( - "{BASE_PLACEHOLDER_TEXT} — {percent_remaining}% context left (consider /compact)" + "{BASE_PLACEHOLDER_TEXT} — {percent_remaining}% context left" ) } }