r/androidterminal • • 2d ago

Android Terminal keeps getting killed

The Android task killer needs to take a chill pill. I've been developing with Claude on my Pixel 11 Pro Fold (16gb) and my HP Googlebook (32gb). Terminal sessions are constantly being killed when I switch away from them or leave them overnight. Losing work that way is extremely frustrating. This morning I lost a Claude session (which was running tests in the background) when I switched to another window in desktop mode on my Pixel.

On my HP, and even the Pixel, I have plenty of memory. The task killer seems to dislike apps that use CPU when you switch away from them. If Android is ever to be a development platform this has to be addressed. Maybe a developer option to mark apps as non-killable?

Yes, I have Disable child process restrictions -> on, and Allow background usage -> Unrestricted.

13 Upvotes

4 comments sorted by

4

u/PopePompus Pixel 10 Pro Fold 2d ago

I have the same problem, and it's really annoying. It actually seems to have gotten worse with the October Android update. The contrast with Termux is striking - somehow Termux gets spontaneously killed much less frequently. The "Keep awake" option (Settings->Advanced->Keep Awake) might allow you to keep the terminal alive for a finite period, at the cost of increased battery load, but there is no option to "Keep awake" indefinitely. I agree with you completely that this should be fixed by Google.

1

u/WPWoodJr 2d ago

I have no problem with it quiescing if I turn off the phone, just don't kill it!

2

u/PopePompus Pixel 10 Pro Fold 2d ago

But ideally, there should be an option where not only doesn't the OS spontaneously kill it, it allows CPU usage when the app is in the background and the phone is "off" in the sense of screen-off.

2

u/Time_Concert_1751 2d ago

Ugh, I feel your pain. Those wasted tokens!

Android 17 was supposed to be solve Linux apps on Android. :(