Originally published at omerbinsaleem.com by Omer Bin Saleem (Omer Saleem).

Twice a backend test suite died mid-compile with exit 143 or 144 and no failure printed. Nothing in the code was wrong: another session on the same machine had reached the build daemon.

How to do it

  1. Read the shape of the death before you read the code. Exit 143 or 144, a log that simply stops mid-compile, no stack trace and no failing test: that run was ended from outside. It happened twice in one day on our backend suite, and both times the code was fine.
  2. Ask who else on the machine runs the same build tool. Another Claude session or a cleanup script calling gradlew --stop reaches daemons it never started, and a process group kill takes down anything sharing your shell. You usually cannot tell afterwards which of the two it was, so defend against both.
  3. Give your run a daemon registry nobody else looks in: ./gradlew --no-daemon -Dorg.gradle.daemon.registry.base=<scratch>/gradle-registry test. A --stop somewhere else cannot stop what it cannot find in that registry.
  4. Detach the run from your shell so a group kill misses it: perl -MPOSIX -e 'POSIX::setsid(); exec @ARGV' nohup <script>. The private registry plus its own session is the pair that survived.
  5. Cap how many builds run at once. A slot script holding it to two was set because each Kotlin compile wants about 4 GB on a 24 GB machine, and a cold checkout compiles around 1300 Kotlin files: 10 to 17 minutes for compile plus suite, against about 3 minutes when that checkout was built before. One lost run costs real time, so make losing one hard.

Prompt to copy

Before you start a long build here, check whether another agent session or a script on this machine runs the same build tool. If anything does, start my run detached in its own session with a private daemon registry so a stop command elsewhere cannot see it, and keep at most two builds going at once. When the run ends, tell me the exit code and the last twenty lines of the log first, before you say anything about test results. If the exit code is 143 or 144 and the log stops mid-compile, treat it as a kill from outside, not as a test failure, and start it again isolated. 

I am Omer Bin Saleem, a frontend chapter lead who builds with AI every day. One practical AI hack a day at omerbinsaleem.com. LinkedIn: omer-bin-saleem · Instagram: @iomerbinsaleem.

Written with AI assistance, from my own work notes.