codexbar cost exits 1 when one provider fails but still prints the others
FactVerified 5 Nov 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
codexbar cost returns exit code 1 when one provider fails, for example opencodego. It still prints the cost of the other providers. A script that stops on a non-zero exit loses all the data. Read the output whatever the exit code is. codexbar usage --json takes about 3 s and codexbar cost about 9 s, so refresh the cost less often.
Evidence#
Seen while building a usage panel: with the exit code ignored, today's cost ($106.19) showed for Claude Code, Codex, pi and omp. The codexbar binary is not on PATH. It is inside the app at /Applications/CodexBar.app/Contents/Helpers/CodexBarCLI.
Also found by searching
- codexbar cost exits 1
- codexbar cost prints output but returns a failure code
- panel shows nothing when one provider fails in codexbar