Skip to content

// guides

Fix Termux Process Completed (Signal 9) on Android

If Termux dies with [Process completed (signal 9) - press Enter] in the middle of a job, that is the Android 12+ phantom process killer, not a Termux bug. Android kills background ("phantom") processes once the system-wide count passes 32, or when one uses heavy CPU. The fix depends on your Android version: on Android 14+ flip a Developer Options toggle; on Android 12, 12L, and 13 run one ADB command; on rooted phones use su. We cover all three below, then the honest catch: even fixed, a long AI agent session is the workload most likely to get killed.

This guide was written by the Cosyra team. We hit signal 9 ourselves running a long agent session in Termux on an Android 14 phone, and we cross-checked every command against Termux issue #2366 and the fix steps on Ivon's Blog, verified 2026-06-10.

The one thing to understand first: signal 9 is not Termux crashing. It is Android deciding your terminal has too many background processes and sending SIGKILL. That means the real fix is an Android setting, not a Termux setting, and which setting you can reach depends entirely on your Android version.

Decision diagram for the Termux signal 9 error: the [Process completed (signal 9) - press Enter] message is caused by the Android 12+ phantom process killer, which kills background processes past a count of 32 or under heavy CPU. The fix differs by version: Android 14+ has a Developer Options toggle called Disable child process restrictions; Android 12, 12L, and 13 require an ADB command to set settings_enable_monitor_phantom_procs to false; rooted devices run the same command with su. A caveat notes a system update can reset it and the limit still exists. The bottom path shows a cloud Ubuntu container is not Android, so the phantom killer does not exist there and a long agent keeps running while the phone is locked.
The signal 9 error, its cause, the per-version fix, and the container path that never hits it — diagram, verified 2026-06-10 against Termux issue #2366 and the published ADB fix commands.

What signal 9 actually is

Signal 9 is SIGKILL, the signal a process cannot catch or ignore. When the Android OS sends it, the process is gone immediately, and Termux reports the shell child died with [Process completed (signal 9) - press Enter]. So the message is accurate but misleading: nothing in Termux failed. Something outside Termux reached in and killed the process.

On Android 12 and newer, that something is almost always the phantom process killer. Android 12 added a monitor that counts background child processes across the whole system and kills them once the count passes a default of 32, and it also targets processes burning CPU in the background. The Termux README warns about exactly this, and the long-running tracking issue #2366 collects hundreds of reports of the same error.

termux on android 14, the moment it dies

$ python train.py --epochs 50

epoch 1/50 ...

epoch 2/50 ...

[Process completed (signal 9) - press Enter]

The fix, by Android version

There is no single command that works everywhere, and that is the source of most of the confusion online. What you can do depends on your Android version. Pick the section that matches your phone.

Android 14 and newer: the Developer Options toggle

This is the easiest path and needs no computer. Turn on Developer Options first: open Settings, go to About phone, and tap Build number seven times. Then open Settings, Developer Options, and enable Disable child process restrictions. Reboot. That toggle is Google's own switch for this behavior, and it is the cleanest fix when your device exposes it.

Android 12, 12L, and 13: ADB from a computer

These versions have no toggle, so you change the setting over ADB. Enable USB debugging (same Developer Options menu), connect the phone to a computer with the platform-tools installed, and run the command below. It tells the OS to stop monitoring phantom processes.

on your computer, with the phone connected over adb

$ adb shell settings put global settings_enable_monitor_phantom_procs false

# Android 12 only, also raise the limit:

$ adb shell /system/bin/device_config put activity_manager max_phantom_processes 2147483647

# then reboot the phone

Reboot after running it. If signal 9 comes back later, a system update has probably reset the setting, so reapply the same command.

Rooted devices: run it locally with su

If your phone is rooted you can skip the computer and set the same flag from inside Termux. Run the command, approve the root prompt, and reboot.

inside termux on a rooted phone

$ su -c "settings put global settings_enable_monitor_phantom_procs false"

# grant root, then reboot

The honest catch for long agent sessions

Disabling the monitor widens the limit; it does not delete the mechanism, and a system update can quietly turn it back on. For most uses (an ssh session, a quick script) that is fine. For the workload people increasingly want from a phone terminal, running an AI coding agent for half an hour while they do something else, it is shakier. An agent session is a long-lived, CPU-active process, which is the exact profile the phantom killer was built to target. We have watched a perfectly-configured Android 14 phone still kill a long Claude Code on Termux run when it backgrounded the app to save battery on the train.

The opinion we hold that the local-first crowd will push back on: for an agent you want to keep working while your phone is in your pocket, fighting the OS scheduler is the wrong layer to solve this at. The process should not live on the phone at all. That is the design choice behind Cosyra, and it is worth being upfront that it trades away offline use to get there.

Why a cloud container never throws signal 9

The phantom process killer is an Android feature. It does not exist on desktop Linux, and it does not exist in a cloud Linux container. A Cosyra workspace is a per-user Ubuntu 24.04 x86_64 container on Azure AKS, reached from a native Android or iOS app. Because it is real Linux and not Android, there is no 32-process limit and no SIGKILL from a phantom monitor. A long agent run keeps going while your phone is locked, and when you put the phone down the container hibernates and resumes where it left off rather than dying.

The other practical difference is the ABI. Termux is an aarch64 Android userland, so some prebuilt binaries and native packages do not run without workarounds. A container is x86_64 Ubuntu, so standard Ubuntu tooling installs unmodified. We pre-install Claude Code, Codex CLI, OpenCode, and Gemini CLI so an agent is one command away rather than an install fight. For the fuller comparison of the two approaches, see Cosyra vs Termux, and for the range of ways to get a real Linux userland onto Android, including the proot-distro route that has its own phantom-killer exposure, see Android Linux container options.

cosyra on android, the same long job that survives

Ubuntu 24.04.1 LTS (x86_64) — not Android

$ claude

> refactor the auth module and run the suite

(phone locked 18 min — session still running)

edited 6 files · ran pytest · 92 passed

Want a phone terminal that never throws signal 9? A Cosyra container is real Ubuntu, not Android, so there is no phantom killer. Claude Code, Codex CLI, OpenCode, and Gemini CLI come pre-installed. 1 hour free on signup, no credit card. Extend with a 10-hour, 7-day trial when you want more. Google Play / App Store / Pricing details

Who should fix Termux, and who should move off-device

Fix Termux in place if you want a free, local, offline-capable terminal and your phone exposes the Android 14+ toggle (or you are comfortable with ADB). For short interactive work that is the right tool, and it keeps working with no signal. Stay with it especially if offline matters, because a cloud container needs a connection and Termux does not, which we say plainly in the mobile coding terminal guide.

Move the work off the device if your main use is long-running agent sessions, if you are on Android 12 or 13 with no computer for ADB, or if you are tired of a setting that an OS update can silently reset. At that point the container is not a workaround for signal 9, it is a setup where the error category does not exist.

Frequently asked questions

What does "[Process completed (signal 9) - press Enter]" mean in Termux?

Signal 9 is SIGKILL: the Android OS force-killed the process Termux was running, and Termux prints "[Process completed (signal 9) - press Enter]" when its shell child dies that way. On Android 12 and newer the usual cause is the phantom process killer, which kills background processes once the system-wide count passes 32 or when a process uses excessive CPU. A long build or AI agent session is exactly the workload it targets.

Why did Termux start crashing after I upgraded to Android 12, 13, or 14?

Android 12 introduced phantom process monitoring. Before that, on Android 11 and earlier, Termux could run background processes indefinitely. After the upgrade the OS started killing "phantom" child processes, so the same scripts that ran for hours now die with signal 9. The Termux README carries a prominent warning that it may be unstable on Android 12 and newer for this reason.

How do I disable the phantom process killer without root or a PC?

Only on Android 14 and newer, which added a Developer Options toggle. Enable Developer Options, then turn on "Disable child process restrictions" and reboot. On Android 12, 12L, and 13 there is no toggle, so you need ADB from a computer (or root). That version gap is the single most common reason the fix that worked for someone else does not appear on your phone.

Will the signal 9 fix survive a reboot or a system update?

The setting survives a normal reboot once applied, and on most devices you reboot to make it take effect. A system update can reset it, so if signal 9 returns after an OS upgrade, reapply the same toggle or ADB command. Either way you have only widened the limit, not removed the mechanism, so a heavy enough workload can still be killed.

Does the signal 9 error kill AI coding agents like Claude Code on Termux?

Yes, and this is where it bites hardest. Claude Code can be installed on Termux via npm with workarounds, but an agent session is a long-running, CPU-active process, which is precisely what the phantom killer targets. Even with the fix applied, a long agent run on a backgrounded or battery-constrained phone is the most likely thing to be terminated.

Does this error happen in a cloud Linux container?

No. The phantom process killer is an Android OS feature. A Cosyra workspace is a per-user Ubuntu 24.04 container on Azure AKS, not Android, so the mechanism that produces signal 9 does not exist there. A long-running agent keeps going while your phone is locked, and the container hibernates and resumes rather than getting killed mid-task.

tl;dr

[Process completed (signal 9)] is the Android 12+ phantom process killer, not a Termux bug. Fix it by your version: Android 14+ has a Developer Options toggle ("Disable child process restrictions"); Android 12, 12L, and 13 need adb shell settings put global settings_enable_monitor_phantom_procs false; rooted phones run the same with su. Reboot after. The catch: it widens the limit, an OS update can reset it, and long AI agent sessions are still the most likely thing to be killed. A cloud Ubuntu container is not Android, so the error category does not exist there.

Google Play / App Store. Sign up for 1 hour free, no credit card. Extend with a 10-hour, 7-day trial when you want more.

Run long agent sessions where signal 9 can't reach them. A Cosyra container is real Ubuntu on Azure, with Claude Code, Codex CLI, OpenCode, and Gemini CLI pre-installed.

See pricing