tmux has always been useful for remote work, but mobile development makes its value obvious. A phone connection is not a stable desktop cable. Networks change, apps sleep, and long-running tasks often outlive the session that started them.
For AI coding workflows, tmux is not just a power-user terminal tool. It is the persistence layer that lets an agent session, build, log stream, or migration continue on the remote host while the phone disappears and returns.
The problem is not just reconnection
Reconnecting SSH is only one piece. The real question is whether the work on the remote machine kept running and whether you can find the right session again. For coding agents, that session may contain important conversation history and partial progress.
Without tmux, a mobile disconnect can interrupt:
- A Claude Code, Codex, or OpenCode session.
- A long test suite.
- A production log investigation.
- A build or package installation.
- A migration or batch job.
- A local dev server started for inspection.
Some commands are safe to rerun. Others are not. Even when rerunning is safe, losing the agent conversation or the command output wastes time.
tmux keeps the work on the host
When an agent, build, test suite, or log follower runs inside tmux, it can survive the phone leaving the app or switching networks. The session belongs to the remote host, not the fragile mobile connection.
That changes the mobile workflow:
- Start the agent or long task on the remote host.
- Let it continue inside tmux.
- Put the phone away or lose network briefly.
- Reopen Redock later.
- Attach to the existing session and inspect progress.
This is exactly the shape of many real mobile development moments. You do not always need to stare at the terminal. You need confidence that the work kept running.
Redock makes tmux a workflow
Raw tmux is powerful, but it has a command vocabulary: tmux new, tmux attach, session names, panes, windows, prefixes, and navigation commands. Advanced users can still type those commands directly. But on a phone, the basic create, attach, and resume flow should not require remembering tmux syntax every time.
Redock exposes tmux through Host, Project, Action, and background-task flows. You can create or attach sessions from pickers, run long tasks in tmux, and open live sessions or logs from Run detail.
The goal is not to simplify tmux by removing power. The goal is to make the common persistence path easy enough to use every day.
Choosing the right run mode
tmux becomes most valuable when paired with the right task type.
| Work type | Example | Recommended approach |
|---|---|---|
| Agent conversation | codex, claude --resume |
Interactive session inside recoverable tmux |
| Quick check | git status --short |
Quick Task, no tmux required |
| Focused test | npm test -- auth |
Quick Task if short, tmux if long |
| Build | npm run build |
Background Long Task |
| Log watching | tail -f app.log |
Interactive tmux session |
| Migration | rails db:migrate or custom script |
Background Long Task with care |
The key question is: should this work survive if the phone disconnects? If yes, use tmux-backed execution.
Good tmux patterns for mobile development
A few patterns make tmux much more useful from a phone:
- Keep one pane for the agent and another for tests or logs.
- Use clear session names tied to Projects or tasks.
- Run long builds, migrations, or agent work as background long tasks.
- Return from Activity instead of guessing which shell still matters.
- Install tmux on the remote host, not on the phone.
- Avoid starting important long work in a disposable plain shell.
For coding agents, a common layout is one pane for conversation and one pane for verification. The agent can explain a change, while the second pane runs tests, watches logs, or checks Git state.
Troubleshooting tmux in a mobile setup
If tmux sessions do not appear, confirm that tmux is installed on the remote host and enabled in the Redock Host settings. On macOS, Homebrew is the common path:
brew install tmux
On Debian or Ubuntu servers:
sudo apt install tmux
Also confirm that you are connecting to the same Host identity. If you create separate Host entries for LAN, Tailscale, and ngrok addresses, each entry may have its own context. Use clear Host names so you know which path you are using.
Quick answer
tmux matters for mobile development because phones disconnect, switch networks, and go into the background. tmux keeps sessions and long tasks alive on the remote host. Redock makes tmux easier to use from a phone by integrating create, attach, resume, background tasks, and Run logs into the normal Project and Action workflow.