Skip to content
Latchkey

Exit Code 4 in CI: What It Means and How to Fix It

Exit code 4 is application-defined, with no universal meaning.

Like exit 3, code 4 is whatever the tool that returned it decides.

What it means

A tool-specific error.

Common causes

  • A specific failure class in the producing tool.
  • A custom exit 4.

How to fix it

Consult the tool’s docs; for example flake8 uses exit codes to signal different result classes.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →