OpenAI Codex CLI Exits With Code 0 on Quota Error, Silently Failing Background Tasks
On August 7, 2026, a developer discovered that OpenAI's Codex CLI reported a usage-limit error exclusively to stderr while returning an empty stdout and an exit code of 0, making the failure indistinguishable from a successfully completed task. Any orchestration system relying solely on exit codes would silently log the quota failure as a finished job. The author found the same pattern — real error on stderr, empty stdout, clean exit — in a separate CLI from a different vendor, suggesting this is a common convention among subscription-gated tools that treat quota exhaustion as a billing condition rather than a program error. A secondary issue on macOS compounds the risk: the absence of a native timeout binary can cause wrapper scripts to return exit code 0 for a 'command not found' error. The developer now recommends treating exit codes as advisory only, flagging empty stdout as an independent failure, and always reading stderr regardless of apparent success signals.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in