AI errno(2) values(netmeister.org)
83 pointsby zdwMay 22, 2026

11 Comments

ameliusMay 25, 2026
> #define EAI 201 /* hallucination */

If only AI threw an error when it hallucinates.

yard2010May 25, 2026
Nah it would just hallucinate this error all the time
FindecanorMay 25, 2026
It would hallucinate error codes that don't exist.
andaiMay 25, 2026
I often ran into an error where multimodal models would refuse to operate in transcription mode due to some system prompt.
cat-whispererMay 25, 2026
what about ETHOS : Error it's Mythos? lol!
tethaMay 25, 2026
ETHOS is generally reserved for a certain type of error involving slab memory and complex logic though.

Let's hope that reference is not too obscure...

chuckadamsMay 25, 2026

    #define ETERNITY 999 /* stuck in thinking loop */
JSR_FDEDMay 25, 2026
#define EKNOWBETTER 231 # ignoring prompt
chmeMay 25, 2026

    #define EPROCRASTINATE 245 /* exhausted all output tokens with reasoning */
aaronmdjonesMay 25, 2026
`errno` is a userland concept; the kernel returns negative error numbers that libc then turns into -1 and sets errno. Thus the correct manpage is errno(3).
eqvinoxMay 25, 2026
OpenBSD up to 5.9 had errno(2) symlinked to intro(2), describing error codes:

https://man.freebsd.org/cgi/man.cgi?query=errno&apropos=0&se...

Also, your statements about the kernel and libc are OS specific.

WhyNotHugoMay 25, 2026
Why does libc do this instead of simply returning that same negative number?
rcxdudeMay 25, 2026
POSIX, basically. It was already a convention by the time linux/glibc implemented it.
cluckindanMay 25, 2026
207 is a bald move
cold_harborMay 25, 2026
#define ESYCOPHANT 200 /* user asserted 2+2=5; model concurred */
OhMeadhbhMay 25, 2026
As a long time emacs user, I appreciated the inclusion of EMACS as an error code. When I moved from TECO to gnu emacs in to 80s, elisp was an advance. Now I have a perpetual todo item... "rewrite emacs in fennel or janet or even minimalisp."

"What was deluxe is now debris..."

SoftTalkerMay 25, 2026
Missed one...

   EHAL    231    /* I'm sorry Dave, I cannot do that */