Minecraft exit code 0: the game was closed, the question is by what

Exit code 0 is the odd one: by convention it means a program ended normally, with no error. When the Minecraft launcher reports exit code 0 after the game vanishes mid-launch or mid-session, it means the Java process ended without crashing in the usual way, something told it to stop, or it decided to stop. On modded installs, a mod forcing a shutdown is the classic cause; on any install, an external kill or a launcher misconfiguration can do it too.

Trace it, in order

  1. Check the log's last lines (latest.log in the logs folder, or the launcher's output log). A clean-looking end with mod messages points at a mod halting the game; an abrupt cut-off points at the process being killed.
  2. Test a vanilla installation profile in the launcher. If vanilla runs, the modded setup is the problem, and removing mods in halves finds the one forcing the exit.
  3. Look for 'exit' features in mods and config: some mods and modpacks intentionally close the game on a detected problem, and log a reason just before doing so.
  4. Disable overlays and recording tools (Discord overlay, GPU overlays, screen recorders) for one test launch; injected overlays can terminate the process.
  5. Check antivirus history for the Java process being quarantined or blocked around the time the game closed.
  6. Confirm the launcher is not set to close or the profile is not corrupted by creating a fresh installation profile pointing at the same game directory.

Why 0 confuses everyone

Crash codes get the attention, so a game that disappears with a 'success' code feels like a lie. In practice the JVM reports how it ended, and a deliberate System.exit call from a mod, a watchdog killing the process, or the launcher ending the session all produce 0 or near-clean exits. The log is the witness: code 0 plus a tidy log is an intentional exit; code 0 plus a log sliced mid-line is a kill.

Common questions

Is exit code 0 bad for my worlds or saves? A mid-session exit can leave the world exactly as of the last autosave, and an unclean kill while saving carries a small corruption risk, which is why backups matter. The code itself does not damage anything.

Vanilla also exits with code 0. Now what? Move to the external suspects: update graphics drivers, test with overlays and antivirus real-time scanning paused, and try the launcher's fresh profile. If it persists, the full log from a failed launch is the thing support or a forum will need.

Related

Minecraft exit code 1 · Minecraft exit code 255 · Minecraft 'pixel format not accelerated' · Could not create the Java Virtual Machine