diff --git a/scripts/install/install.sh b/scripts/install/install.sh index fed4c49770..f5d536331b 100755 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -1085,7 +1085,15 @@ print_launch_instructions() { maybe_launch_codex_now() { if prompt_yes_no "Start Codex now?"; then step "Launching Codex" - "$BIN_PATH" + if [ -t 0 ]; then + "$BIN_PATH" + elif [ "$os" = "darwin" ]; then + # macOS can't poll /dev/tty for keyboard events. Open the controlling device directly. + launch_tty="$(ps -p "$$" -o tty= | awk '{print $1}')" + "$BIN_PATH" <"/dev/$launch_tty" + else + "$BIN_PATH"