I have been thinking about this issue and its potential causes.
For me I have migrated an SSD from a Mac slightly older than the model it is in now. Originally that SSD was installed with OS High Sierra, and the update was performed on the newer Mac. Are other people in this thread from a similar situation where by the Mac having the issue has had a hard drive swapped out or anything like that too?
My logic on this is that the Mac I have this issue with was running an install of OS X Yosemite when I received it and when I transferred the High Sierra SSD in to it.
I am thinking that somewhere this change over is what may have lead my MacBook to the state it is now (non bootable diagnostics).
I spoke to a 3rd party repairs and sales shop about the issue I'm having this morning and he suggested running a full install of Mojave over the current OS but to ensure I do so from a BOOTABLE DVD OR USB INSTALLER ISO and NOT by running the installer from within the Mac after it downloads as this may help to get the EFI partition and any conflicts resolved.
Outside of this I also spoke to someone in the IRC channel ##apple (not #apple) who was previously an Apple repair tech and he put me on another potential path as follows
1: Remove current drive and replace with a blank Drive (as I have a spare, if not the solution would be a full format of the current drive back to clean)
2: Boot into factory recovery mode (hold SHIFT + OPTION + COMMAND + R) this will connect over the network to the apple servers recovery that allows for download and install of the SUPPLIED os your Mac came with
3: When in this recovery menu open a terminal window and reset the NVRAM (with command : nvram -c) once this command has finished in terminal reboot back to factory recovery (hold SHIFT + OPTION + COMMAND + R)
4: Now from within this recovery run the installer and fresh install your factory supplied OS which should also rebuild the original recovery partition as well.
5: Once this is all done boot the OS once and reboot the system and try to run the diagnostics mode holding D again
hopefully this will work but at the moment I am too busy to try either method as I have work to do on the machine so until I get some free timbal I can do is offer the advice I have been given
PS : IF ANYONE IS TO TRY ANY OF THE METHODS ABOVE BE SURE TO CREATE A BOOTABLE BACKUP OF YOUR CURRENT SYSTEM OR REMOVE YOUR CURRENT SYSTEM DRIVE AND PERFORM THE REINSTALL USING A FRESH DISK
if diagnostics mode is then working after the process, update the OS all the way back up to your current version, then try replacing the original system disk and seeing if the diagnostics still boots having been rebuilt through the process