# Self-Healing CI: Recovering a Job OOM-Killed Mid-Run

> A job killed by the out-of-memory killer mid-run hit a memory ceiling, not a code bug. See the manual fix and how self-healing CI retries with adequate memory.

Source: https://latchkey.dev/learn/self-healing-ci/self-healing-oom-killed-job-exit-137  
Updated: 2026-06-26

A job that is killed for memory partway through is the runner enforcing a ceiling, not your code failing -- retrying with adequate memory completes it.

## What makes a failure safely retryable

Automatic retry is only correct for failures that are genuinely transient. Retrying a deterministic failure wastes minutes and hides a real defect, so the classification matters more than the retry mechanism.

- Safe to retry: network timeouts, registry 5xx, transient DNS failures, a service container that was not ready, a spot instance reclaimed mid-run.
- Not safe to retry: assertion failures, compile errors, lint violations, anything that fails identically on every attempt.
- Ambiguous, and worth investigating rather than retrying: out-of-memory kills, disk exhaustion, and flaky tests. These repeat under load and a retry only hides the trend.
- Always record that a retry happened. A pipeline that silently retries is a pipeline whose real failure rate you do not know.

## FAQ

### What causes Self-Healing CI: recovering a job OOM-Killed Mid-Run?

A job is killed mid-run by the out-of-memory killer after a step’s memory use spiked past the runner’s ceiling. The build was progressing fine; it briefly needed more memory than the runner had. A human re-runs on a larger runner, or lowers peak memory, and the job completes unchanged.

### How do I fix Self-Healing CI: recovering a job OOM-Killed Mid-Run manually?

[object Object]

### Can Self-Healing CI: recovering a job OOM-Killed Mid-Run be fixed automatically?

An OOM kill has a clear, detectable signature, and the right response is well-defined: retry with adequate resources rather than masking a code bug. A self-healing CI pipeline recognizes the out-of-memory condition, retries the step with the memory it needs, and only escalates if the failure is a genuine leak rather than a mechanical

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
