utf9k A robot icon

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:

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.

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.