utf9k

Something to think about: Has anyone seen my keys? I dropped them in here somewhere...

How can I get Claude Code to execute background tasks on Termux?

At the time of writing, attempting to run Claude Code on Termux works, however any background tasks involved will return an error similar to this:

bash
EACCES: permission denied, mkdir '/tmp/claude/-data-data-com-termux-files-home/tasks'

The issue here is that Claude assumes that the user has permission to create files within /tmp which is not true for Termux.

While this should be fixed properly, you can use PRoot in the meantime as a workaround.

bash
proot -b /data/data/com.termux/files/usr/tmp:/tmp claude

You’ll probably want to turn this into a shell alias/function for convenience.