On agentic coding from anywhere: A mobile workflow using SSH, mosh, tmux, and Tailscale

On agentic coding from anywhere: A mobile workflow using SSH, mosh, tmux, and Tailscale

Tags
Coding
Published
December 15, 2025
URL
kareemf.com/on-agentic-coding-from-anywhere
Description

How turning my phone into an agentic coding environment using SSH, tmux, mosh, and Tailscale expands creative and productive opportunities.

  • Context
  • V1: TailScale + VibeTunnel + Claude
  • V2: Tailscale + SSH + Mosh + Tmux + Termius + Claude
  • V2.5: Leveraging iTerm2’s tmux integration
  • Inspiration
  • Appendix
  • Portable environment configs
  • SSH authentication workflow
  • Unexpected impact on habits
  • Networking, DNS & ad blockers
  • Conclusion

Context

Agentic coding - equipping LLMs with tools that can take action on your behalf - opens the door to a new mode of development: building from anywhere. With the right setup, you can start work on one device and continue on another, relying on persistent sessions to maintain continuity across them. I briefly introduced this idea in On working with agentic models and it warrants deeper dive. The goal isn’t to work more, but to lower the activation energy required to explore or iterate on ideas.

After experimenting with different tools and setups, I’ve landed on a workflow built on SSH, mosh, tmux, and Tailscale that lets me start something on my laptop, continue on my phone, and pick it back up on my tablet so long as I have a network connection.

This post walks through the evolution of that setup, what I learned along the way, and some of the unexpected impacts on my habits.

Here’s how it started.

V1: TailScale + VibeTunnel + Claude

My initial approach was to use TailScale and VibeTunnel to control Claude Code sessions running on my laptop from my phone while away from home.

  • Tailscale: VPN + DNS for devices. Allows me to connect to <username>@laptop from anywhere with internet, where "laptop" is the actual device identifier without exposing it over the public internet
  • VibeTunnel: a browser-based terminal access tool. Since it sits on Tailscale, no port forwarding or SSH key management required.

The workflow that I’ve settled on, that works both when I’m away from home and when I’m at home but away from my desk, is to:

  • Jot down an idea as a note (as part of my existing writing habits).
  • Refine the idea into a prompt.
  • SSH into my development machine - from any personal device that can act as a terminal - and fire off the prompt. This could be done from a phone while away from home.
  • Follow up on the results later - again, from any of my devices that can run a terminal, not just my laptop.

Anecdotal use case: if I’m nap-trapped by my sleeping infant, sending commands from my phone doesn’t disrupt her, whereas contorting to try typing on a laptop does.

About a week of trial and error was enough to validate the usefulness of the idea. But I also found that VibeTunnel’s browser-based interface introduces too much friction to the terminal typing and navigation experience. Especially with the release of Liquid Glass in the Apple ecosystem, where there is now added friction to simple actions like switching browser on iOS - unless you find and disable the Compact Tabs layout setting.

That led to V2.

V2: Tailscale + SSH + Mosh + Tmux + Termius + Claude

I replaced VibeTunnel with classic SSH. I also introduced tmux for session management and Mosh for maintaining connections.

  • SSH: a connection protocol to allow device A (e.g. a phone) to connect as a client to device B (e.g. a laptop) that is acting as a server
  • Mosh: allows SSH sessions to survive instability such as mobile internet connection loss or device sleep
  • Tmux: a SSH session manager, including windows and panes. Allows you to start long-running tasks on one device and continue in the same session on another.
  • Termius: an iOS SSH client that supports mosh

Now,

“Follow up on the results later.” becomes →

“Follow up on the results later - by attaching to a tmux session.”

This worked pretty well with one caveat: I had to remember to either create or attach to a tmux session before kicking off work. Otherwise, processes would live in non-tmux shells, so I wouldn’t be able to seamlessly resume on another device. I also thought it was a good idea to create a session per project. Turns out that neither of those things needs to be true.

Which led to V2.5.

V2.5: Leveraging iTerm2’s tmux integration

iTerm2 for Mac offers deep tmux integration:

  • You can set your login script to join a default “main” session
  • Your native tabs and panes transparently become tmux windows and panes.

If you’re used to having one tab per project, this should require no change to your existing workflow. When you SSH in from a iTerm terminal, you can immediately run tmux attach -t main. You can then cycle through your windows/tabs (which usually correspond to projects) using the keyboard commandsctrl + b -> n / p

It’s the best of both worlds.

In essence, you get your normal iTerm experience when on a Mac and you get a normal tmux experience everywhere else.

The only odd bit is the ergonomic divergence: iTerm will use its own key bindings instead of tmux’s and vice versa.

Inspiration

I’ve quoted Simon Willison in a few AI-related posts already and it seems the trend will continue with this one. That is because he often prompts me to update my mental model of what is possible with and how to use these tools. His post, Vibe scraping and vibe coding a schedule app for Open Sauce 2025 entirely on my phone, is in part what motivated me to go down the mobile agentic development rabbit hole. Here’s an excerpt from that post that aligns with my assertion that software engineering skills still matter:

I was able to scrape a website…turn the resulting JSON data into a mobile-friendly website…and deploy the results to a static hosting platform (GitHub Pages) working entirely on my phone.

As usual with this stuff, my 25+ years of previous web development experience was critical to being able to execute the project. I knew about Codex, and Artifacts, and GitHub, and Playwright, and CORS headers, and Artifacts sandbox limitations, and the capabilities of ICS files on mobile phones.

Appendix

Portable environment configs

SSH authentication workflow

Unexpected impact on habits

Networking, DNS & ad blockers

Conclusion

I’ve used the word “productive” in this post not to suggest working more or grinding harder. What I mean is expanding the number of situations in which it becomes possible to explore or make progress on ideas. It’s the same principle behind the practice mentioned in You will fail > Focus on forming useful habits rather than sustaining motivation: cultivating the habit of writing by leaving pens and paper around my home.

This mobile-enabled workflow extends that principle to software creation. Combining tools like SSH, mosh, tmux, and Tailscale creates the infrastructure for agentic models to access and utilize your development environment from virtually anywhere. And that, in turn, lowers the activation energy required to pursue and iterate on your ideas, increasing the odds of nurturing them into something real.