<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jaga</title>
    <description>The latest articles on Forem by Jaga (@jagafarm).</description>
    <link>https://forem.com/jagafarm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3874233%2Fa1f3b031-3afa-47f9-91d1-4c70d2eb8e93.png</url>
      <title>Forem: Jaga</title>
      <link>https://forem.com/jagafarm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jagafarm"/>
    <language>en</language>
    <item>
      <title>The 300-gram AI coding rig: iPad mini + Claude Code anywhere</title>
      <dc:creator>Jaga</dc:creator>
      <pubDate>Mon, 13 Apr 2026 21:15:13 +0000</pubDate>
      <link>https://forem.com/jagafarm/the-300-gram-ai-coding-rig-ipad-mini-claude-code-anywhere-e1o</link>
      <guid>https://forem.com/jagafarm/the-300-gram-ai-coding-rig-ipad-mini-claude-code-anywhere-e1o</guid>
      <description>&lt;p&gt;For the last two months, my daily Claude Code workstation has weighed about 300 grams.&lt;/p&gt;

&lt;p&gt;Not the laptop. Not the desk. The whole thing — tablet, keyboard, the whole rig that I actually use to send prompts to Claude Code, watch the agent work, and ship code from a coffee shop. It's an iPad mini A17 Pro and a folding split keyboard, and I'm increasingly convinced this is the right shape of "AI coding workstation" for anyone who already runs an agent on a real machine somewhere.&lt;/p&gt;

&lt;p&gt;I expected this to be a gimmick that I'd abandon after a week. It wasn't. So this post is the actual setup, the parts I use, and the one thing about iPad mini that I now consider a feature instead of a limitation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "AI coding from a tablet" actually means
&lt;/h2&gt;

&lt;p&gt;Let me clear up the obvious confusion first: I am not writing Swift on an 8.3-inch screen. Nobody should do that.&lt;/p&gt;

&lt;p&gt;What I'm doing is much narrower:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code runs on a Mac mini at home.&lt;/strong&gt; That's where the codebase lives, that's where the agent has full filesystem and shell access, that's where the actual work happens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The iPad mini is a remote control.&lt;/strong&gt; I SSH into the home Mac, attach to a long-running tmux session, type prompts in plain English, and watch Claude Code do its thing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My job is the prompt and the review.&lt;/strong&gt; I read the agent's plan, I approve or redirect, I check the diff. The iPad mini is the screen and keyboard for that conversation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you frame it that way — &lt;em&gt;typing intent and reading output&lt;/em&gt; — the screen size objection disappears. I'm not in a code editor. I'm in a terminal. Terminals scale down beautifully.&lt;/p&gt;

&lt;h2&gt;
  
  
  The exact rig
&lt;/h2&gt;

&lt;p&gt;Here's everything I carry:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;iPad mini A17 Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~293 g&lt;/td&gt;
&lt;td&gt;The screen and the brains for the prompt-and-review loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Folding split keyboard&lt;/strong&gt; (I use a 40-key split board, but any Bluetooth board with Ctrl/Esc works)&lt;/td&gt;
&lt;td&gt;~200 g&lt;/td&gt;
&lt;td&gt;Real keys, real Ctrl, real Esc, no soft keyboard pain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A small sleeve&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;negligible&lt;/td&gt;
&lt;td&gt;So I can throw it in any bag&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's it. No hub, no laptop bag, no power brick. Battery life is a full work day even with continuous SSH.&lt;/p&gt;

&lt;p&gt;The keyboard part matters more than people expect. &lt;strong&gt;Any iPad terminal experience without a real Ctrl key is going to make you miserable&lt;/strong&gt; — every shell command needs Ctrl-C, Ctrl-D, Ctrl-R, and the soft keyboard's modifier handling is nowhere near good enough. A cheap split board changes the entire experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The software side
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtbhb1i2ta2fjj0f9rcs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtbhb1i2ta2fjj0f9rcs.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Four pieces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://tailscale.com" rel="noopener noreferrer"&gt;Tailscale&lt;/a&gt;&lt;/strong&gt; — free for personal use. Lets the iPad mini reach my home Mac mini securely from anywhere, with no router config or port forwarding. I cover the install in my Tailscale post (link will go here once that one is published).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An iOS terminal app&lt;/strong&gt; — anything that does SSH and ideally Mosh. (More on this in a moment.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tmux&lt;/code&gt; on the Mac side&lt;/strong&gt; — so the Claude Code session keeps running even when my SSH connection drops. I have a four-command tmux primer if you've never used it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code itself&lt;/strong&gt; — installed on the Mac, started inside the tmux session.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Home in the morning  →  ssh into Mac, tmux new -As work, claude
                     →  ask Claude Code to do the long task
                     →  Ctrl+b d (detach), close laptop, leave the house

On the train        →  ssh into Mac from iPad mini, tmux attach -t work
                    →  see exactly what Claude Code is doing
                    →  answer its questions, redirect, approve

Cafe                →  same thing, different network — tmux + Mosh keeps it alive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once this loop is set up, the iPad mini becomes a &lt;em&gt;passive monitor&lt;/em&gt; for the agent. You're not even really "using" it most of the time. You give it a prompt, you go read a book, you come back when the notification fires.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thing I didn't expect: the constraint is the feature
&lt;/h2&gt;

&lt;p&gt;Here's the part of this setup that surprised me.&lt;/p&gt;

&lt;p&gt;iPad mini is genuinely bad at multitasking. The 8.3-inch screen makes Stage Manager pointless. You can't really run a code editor and a terminal and a browser side-by-side. You do &lt;em&gt;one thing at a time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I assumed this would be the dealbreaker. It turned out to be the killer feature.&lt;/p&gt;

&lt;p&gt;When my workstation is a MacBook with eight tabs open, I cannot stop context-switching. I check Slack, I check email, I look something up "real quick," I lose forty minutes. When my workstation is an iPad mini with literally no room for distraction, the loop is brutally simple: &lt;strong&gt;prompt the agent → put the device down → read a book → pick it up when something happens.&lt;/strong&gt; I get more deep work done in two hours of iPad mini time than in four hours at my desk.&lt;/p&gt;

&lt;p&gt;Single-tasking, when it's enforced by physics rather than willpower, is a productivity hack disguised as a hardware limitation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about the terminal app?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01uqsstjy3gbneizqjv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01uqsstjy3gbneizqjv1.png" alt=" " width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the part I struggled with for a long time, and the part that eventually made me build my own.&lt;/p&gt;

&lt;p&gt;Most iOS terminals are fine for occasional SSH. They are &lt;em&gt;not&lt;/em&gt; fine for the rig I just described. The pain points stack up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tap-tap-tap to switch tmux panes because the prefix key is hostile to touch&lt;/li&gt;
&lt;li&gt;SSH dies the moment you switch from Wi-Fi to LTE on the train, and you lose your scrollback&lt;/li&gt;
&lt;li&gt;No system-level notification when Claude Code is waiting on you, so you keep checking your phone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After about a year of duct-taping around all of this, I built &lt;strong&gt;&lt;a href="https://apps.apple.com/app/mt-mosh-terminal/id6760889044?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=phase-c-en&amp;amp;utm_content=02-ipad-mini-rig-mid" rel="noopener noreferrer"&gt;MT — Mosh Terminal&lt;/a&gt;&lt;/strong&gt; — a $14.99 one-time iOS terminal that has real Mosh (so the connection survives subway tunnels), one-tap tmux operations (no prefix-key juggling), and system push notifications wired into Claude Code Hooks (so the moment the agent needs me, my phone buzzes and a tap drops me back into the exact session). If the iPad mini rig sounds appealing but the terminal-app friction is what's stopping you, that's literally the reason MT exists. I'll write more about it in another post in this series; for now, just know it's there.&lt;/p&gt;

&lt;p&gt;You don't &lt;em&gt;have&lt;/em&gt; to use MT for any of this to work. Any terminal that can hold an SSH connection will get you started. The rig is the rig regardless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who this setup is actually for
&lt;/h2&gt;

&lt;p&gt;Be honest with yourself before buying anything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;You already use Claude Code (or Codex, or any agent CLI) on a Mac.&lt;/strong&gt; This setup is a remote control for a workflow you already have. It does not make sense as a starting point.&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;You like the "give it a task, walk away, come back" rhythm.&lt;/strong&gt; If you need to be hands-on every keystroke, the iPad mini will frustrate you.&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;You travel, commute, or hate being chained to a desk.&lt;/strong&gt; Every hour I spend not at my main rig is an hour I'd otherwise lose.&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;You want to write code by hand.&lt;/strong&gt; Get a real laptop.&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;You don't have a home Mac to SSH into.&lt;/strong&gt; Tailscale + Claude Code on a remote box (a cloud VM, a Raspberry Pi, anything) works too, but you do need &lt;em&gt;some&lt;/em&gt; always-on machine on the other end.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;The iPad mini AI coding rig is 300 grams of tablet, 200 grams of keyboard, four free or one-time-purchase pieces of software, and a workflow that turns "I need to step away from my Mac" from an interruption into a feature. After two months I have stopped reaching for my MacBook for anything that's just "talk to Claude Code for an hour."&lt;/p&gt;

&lt;p&gt;If this resonates and you want the mobile-terminal half of the story, → &lt;a href="https://apps.apple.com/app/mt-mosh-terminal/id6760889044?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=phase-c-en&amp;amp;utm_content=02-ipad-mini-rig-footer" rel="noopener noreferrer"&gt;MT — Mosh Terminal on the App Store&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm a solo iOS developer. I write about gadgets and dev tools at &lt;a href="https://jaga-farm.com" rel="noopener noreferrer"&gt;jaga-farm.com&lt;/a&gt;. MT — Mosh Terminal is my first App Store release. Find me on X at &lt;a href="https://x.com/jaga_farm" rel="noopener noreferrer"&gt;@jaga_farm&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>mobile</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Stop losing Claude Code sessions: a tmux primer for mobile devs</title>
      <dc:creator>Jaga</dc:creator>
      <pubDate>Sun, 12 Apr 2026 00:34:07 +0000</pubDate>
      <link>https://forem.com/jagafarm/stop-losing-claude-code-sessions-a-tmux-primer-for-mobile-devs-2p48</link>
      <guid>https://forem.com/jagafarm/stop-losing-claude-code-sessions-a-tmux-primer-for-mobile-devs-2p48</guid>
      <description>&lt;p&gt;You ask Claude Code to refactor a module. It says "this will take a few minutes." You close your laptop and head out for coffee. You come back, open the lid, and your SSH session is dead, your terminal is empty, and Claude Code never finished — because the moment your connection dropped, the agent that was running on your remote machine got killed along with it.&lt;/p&gt;

&lt;p&gt;If you've felt that exact frustration, the fix has existed for over a decade and it's called &lt;strong&gt;tmux&lt;/strong&gt;. This post is the shortest possible introduction I can write — four commands, one analogy, and a workflow that lets you walk away from your AI agent without losing its work.&lt;/p&gt;

&lt;h3&gt;
  
  
  What tmux actually does
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccua6n3t1ampf629u3bj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccua6n3t1ampf629u3bj.png" alt=" " width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tmux&lt;/code&gt; (terminal multiplexer) is a small program that runs on your &lt;strong&gt;server or remote Mac&lt;/strong&gt; and keeps your terminal session alive even when you're not connected to it.&lt;/p&gt;

&lt;p&gt;The TV analogy is the easiest one I know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plain SSH is live broadcast.&lt;/strong&gt; If you leave the room, you miss it. If the cable goes out, the show is gone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tmux is recording.&lt;/strong&gt; The show keeps running on the box at home. When you come back, you reconnect and pick up exactly where you left off.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Claude Code, this is the difference between "I asked it to do something big and lost an hour of work" and "I asked it to do something big and watched the result roll in from my phone three hours later." The agent doesn't care that you walked away. tmux is what makes that possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three layers (skim this and move on)
&lt;/h2&gt;

&lt;p&gt;You don't need to memorize this. Just know these words exist:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Mental model&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Session&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A desk&lt;/td&gt;
&lt;td&gt;Your workspace. You can have a "work" session and a "personal" session running side by side.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Window&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A browser tab&lt;/td&gt;
&lt;td&gt;Tabs inside a session. Switch with one key.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pane&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A split view&lt;/td&gt;
&lt;td&gt;Splits inside a window. Useful on big screens, painful on phones.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For mobile work, &lt;strong&gt;one session, one or two windows, no panes&lt;/strong&gt; is all you need. Pane splits are nice on a 27-inch monitor and miserable on a 6-inch screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install it (one minute)
&lt;/h2&gt;

&lt;p&gt;tmux runs on the &lt;em&gt;server side&lt;/em&gt; — the machine you're SSH'ing into. You don't install anything on your phone or iPad. On a Mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install Homebrew if you don't have it&lt;/span&gt;
/bin/bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# 2. Install tmux&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;tmux

&lt;span class="c"&gt;# 3. Verify&lt;/span&gt;
tmux &lt;span class="nt"&gt;-V&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see something like &lt;code&gt;tmux 3.6a&lt;/code&gt;, you're done.&lt;/p&gt;

&lt;p&gt;On Linux servers, replace step 2 with &lt;code&gt;sudo apt install tmux&lt;/code&gt; or &lt;code&gt;sudo dnf install tmux&lt;/code&gt; depending on your distro.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four commands you actually need
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvf498aj8quhisx95tps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvf498aj8quhisx95tps.png" alt=" " width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have been using tmux daily for years and I genuinely use &lt;strong&gt;one command 95% of the time&lt;/strong&gt;. Here are all four anyway, in increasing order of "I actually need this."&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Create a session
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux new &lt;span class="nt"&gt;-s&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;work&lt;/code&gt; is just a name. Pick anything. When tmux starts, you'll see a green status bar at the bottom of your terminal — that's how you know you're inside a tmux session.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Detach (leave the session running)
&lt;/h3&gt;

&lt;p&gt;While inside tmux, press:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ctrl+b   then release   then press d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Ctrl+b&lt;/code&gt; is called the &lt;strong&gt;prefix key&lt;/strong&gt;. You always press it, release it, then press a second key. &lt;code&gt;d&lt;/code&gt; is for "detach."&lt;/p&gt;

&lt;p&gt;You'll drop back to your normal shell prompt. The tmux session is still running in the background — your processes are still working, your scrollback is preserved, Claude Code is still doing its thing. You just stepped out of the room.&lt;/p&gt;

&lt;p&gt;You can now safely close your laptop, kill your SSH connection, lose your Wi-Fi, whatever. The session lives on the server.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Re-attach (come back to it)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux attach &lt;span class="nt"&gt;-t&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boom — you're back. Same screen, same scrollback, same running processes. If Claude Code finished while you were gone, you'll see its output waiting for you. If it's still running, you'll see it in real time.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The one command I actually use
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux new &lt;span class="nt"&gt;-As&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-A&lt;/code&gt; flag means "&lt;strong&gt;a&lt;/strong&gt;ttach if a session named &lt;code&gt;work&lt;/code&gt; already exists, otherwise create a new one." This is the only tmux command I type. It's idempotent: it always puts me into the &lt;code&gt;work&lt;/code&gt; session, regardless of whether one was already there.&lt;/p&gt;

&lt;p&gt;If you only memorize one thing from this post, memorize that.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real-world workflow
&lt;/h2&gt;

&lt;p&gt;Here's how I actually use this with Claude Code on a normal day:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Morning, at home, on my Mac:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh me@myserver
tmux new &lt;span class="nt"&gt;-As&lt;/span&gt; work
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I open Claude Code inside the tmux session and ask it to do something that'll take a while — refactor a service, write tests, audit a dependency. Then I close my laptop and leave for the train.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the train, on my phone or iPad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh me@myserver
tmux attach &lt;span class="nt"&gt;-t&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I see exactly the screen Claude Code was looking at when I left. If it's still working, I can watch the progress. If it's finished and waiting on input, I can answer right there. If I need to think about something, I &lt;code&gt;Ctrl+b d&lt;/code&gt; to detach again and the session keeps running while I read a book.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evening, back at the Mac:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux attach &lt;span class="nt"&gt;-t&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same session, same context. I never lost a thing.&lt;/p&gt;

&lt;p&gt;This pattern — start a long-running agent task on one device, monitor and approve from another — is the killer use case for AI coding agents on mobile. tmux is what makes it work.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small gotcha when switching devices
&lt;/h2&gt;

&lt;p&gt;If you attach from your phone while your Mac is also still attached to the same session, tmux will resize the display to the smaller screen. Annoying. The fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmux attach &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-d&lt;/code&gt; flag detaches whoever was previously attached, so only your current device sees the session. I use this constantly when bouncing between Mac and iPad.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common keys (for after you're comfortable)
&lt;/h2&gt;

&lt;p&gt;All tmux commands start with &lt;code&gt;Ctrl+b&lt;/code&gt;, then a second key. Press them in sequence, not together.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you want&lt;/th&gt;
&lt;th&gt;Keys&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Detach&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;d&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List sessions&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;s&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New window&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;c&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next window&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;n&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List windows&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;w&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Help&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;?&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a phone or small tablet, I'd skip pane splitting entirely and just use &lt;strong&gt;windows&lt;/strong&gt;. Two windows — one for Claude Code, one for &lt;code&gt;git status&lt;/code&gt; and file pokes — is enough for almost everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this falls apart on mobile (and what to do about it)
&lt;/h2&gt;

&lt;p&gt;Honest take: tmux's prefix-key model is great on a real keyboard and frustrating on a touchscreen. Tapping &lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;n&lt;/code&gt; on a soft keyboard means hunting for the &lt;code&gt;Ctrl&lt;/code&gt; key, then the &lt;code&gt;b&lt;/code&gt;, then the &lt;code&gt;n&lt;/code&gt;, every single time you want to switch windows. After about ten of those, you start questioning your life choices.&lt;/p&gt;

&lt;p&gt;This is exactly the problem I ran into when I started doing serious AI agent work from my phone. I ended up building &lt;a href="https://apps.apple.com/app/mt-mosh-terminal/id6760889044?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=phase-c-en&amp;amp;utm_content=01-tmux-primer-mid" rel="noopener noreferrer"&gt;MT — Mosh Terminal&lt;/a&gt;, a $14.99 one-time iOS terminal whose entire bottom action bar is just one-tap tmux operations — split, switch, detach, the works — so the prefix-key gymnastics disappear on mobile. It also gets a system push notification the moment Claude Code needs you, so you don't have to keep checking. I'll write more about that in a later post; for now just know that the option exists if mobile tmux ever drives you up a wall.&lt;/p&gt;

&lt;p&gt;You don't need any of that to make tmux work, though. The four commands above are the whole game.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;tmux is a "recording device" for your terminal. Once your sessions live on the server and not on your local connection, the question of "what happens if my laptop sleeps while Claude Code is working" stops being scary.&lt;/p&gt;

&lt;p&gt;The cheat sheet you actually need:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Start (or rejoin)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tmux new -As work&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step out&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+b&lt;/code&gt; then &lt;code&gt;d&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Come back&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tmux attach -t work&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Steal session from another device&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tmux attach -d -t work&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's it. Try it once tonight: open a tmux session on your dev box, run a long task inside it, close your laptop, and reconnect from your phone an hour later. The first time it works you'll wonder how you ever lived without it.&lt;/p&gt;

&lt;p&gt;→ If you want the mobile side of this story, the app I built for it is &lt;a href="https://apps.apple.com/app/mt-mosh-terminal/id6760889044?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=phase-c-en&amp;amp;utm_content=01-tmux-primer-footer" rel="noopener noreferrer"&gt;MT — Mosh Terminal&lt;/a&gt; on the App Store.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm a solo iOS developer. I write about gadgets and dev tools at &lt;a href="https://jaga-farm.com" rel="noopener noreferrer"&gt;jaga-farm.com&lt;/a&gt;. MT — Mosh Terminal is my first App Store release. Find me on X at &lt;a href="https://x.com/jaga_farm" rel="noopener noreferrer"&gt;@jaga_farm&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>cli</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
