boxd.sh & ChatGPT Codex CLI from Android Terminal

At the end of my last post about boxd.sh and Codex, I mentioned that next time I might just SSH into the machine and use Codex in the console, rather than connecting it to the desktop app. I ended up on an unexpected train journey today, and realized that not only could I do that direct SSH from a desktop environment, but likely it would also work from a phone!

If you haven’t come across it yet, Android now has a Linux terminal available on some devices / versions of Android, enabled through Developer options. Its Terminal app gives you a Debian Linux VM? running locally on your phone, using the Android Virtualization Framework.

So you can install packages and run fairly ordinary Linux command-line tools, which is rather convenient considering boxd access is a simply little binary and has authentication built in for its SSH command.

But first, a 600MB update on UK train internet… I’m pretty sure that too 30 minutes…

With that finished, I headed to the boxd documentation to grab the installation command. This is the same CLI used to create and connect to the VM in the previous post, just now running from the phone.

Copy the curl command, paste it into the terminal, and let the installer do its thing.

Installation went smoothly, this actually does make me wonder about what painfull hurt I could cause myself if I tried running codex directly on my phone too…

Anyway, next step was login, which was easy to do via an already authenticated web session in my browser, and boxd was ready to go!

There is no need to repeat all of the GitLab token setup or install a development environment again here. That work was already done on the VM in my previous post.

With boxd installed and authenticated, I could connect to the existing machine in an authenticated ssh session via the boxd command. And tmux then also came in handy as a wrapper around codex to try to fend off issues caused by my spotty train internet.

And in the screenshots you can see the value in trying to go the android terminal route, rather than using the boxd web SSH session, as the keyboard in android terminal is far superior, and in the web session the keyboard often ends up appearing over the top of many parts of the screen that you may want to see.

I played around a little on the train, and it was basically working other than the spotty internet connection.

I then also compared this to working with ChatGPT Codex desktop reusing the same codex remote-control pair workflow as before, and that was also fine. I was expecting it to be more resilient against the spotty internet, but to be honest, in the environment I was in, it was just about as painful!

Getting back to my desk later on in the day, I noticed something odd worth a note here. Some of my sessions were complaining about being network sandboxed, and having no way to escalate this request to me to allow. Basically when loading the remote sessions in Codex Mobile, it ended up stating that This thread uses permissions unavailable in this app, i believe meaning perhaps a slightly different version of the auto approve permissions from my previous desktop spawn? Checking on desktop it was just set to Approve for me however on Mobile the wording is different (Auto-review) and needed to also be selected in order to allow both my Desktop and Mobile attachments to auto approve some actions such as web access.

Although https://learn.chatgpt.com/docs/sandboxing/auto-review says they are the same feature, how this is attached to sessions, and or clients, and how it is passed around is still a little unclear to me.

Possible the next things for me to look at are https://boxd.sh/self-hosting/ and https://github.com/boxd-sh/self-host

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.