All articles
Tonis Tiganik--8 min read

Continue AI Agent Workflows Across tmux, Desktop, Web, and Mobile

Pin a Claude Code, Codex, OpenCode, or shell pane once and keep it prioritized across cwtctl, ClawTab desktop, web, and mobile without moving or restarting the agent.

Continue AI Agent Workflows Across tmux, Desktop, Web, and Mobile

Introduction

An AI coding agent should not become a different task when you move from a terminal to a desktop app or phone. The process, terminal history, working directory, and pending question already exist in one tmux pane. What changes is only the surface you use to reach it.

ClawTab now makes that continuity explicit with shared agent pins. Pin a Claude Code, Codex, OpenCode, or ordinary shell pane from cwtctl, the tmux popup, desktop, web, or mobile, and that item stays at the top everywhere you own the workspace. Scheduled and one-off job pins use the same shared list.

A pin is a priority marker, not a command to open a session. The agent stays where it is, keeps running locally, and remains available through every connected ClawTab client.

The Pane ID Is the Workflow Address

tmux gives each pane a compact identifier such as %17. Inside a pane, the same value is available as $TMUX_PANE. The official tmux manual documents pane IDs as unique identifiers for the lifetime of a tmux server, which makes them a better control-plane address than a window title or process name.

ClawTab displays the pane ID in its interfaces and uses it across the daemon, relay, desktop, browser, and mobile app. A local agent workflow described by a developer as agents running through tmux already has the persistence needed for remote continuation; the shared pin adds a consistent way to keep the important panes within reach.

IdentityExampleWhy it matters
tmux pane ID%17Targets the exact live terminal containing the agent
Pin keypane:%17Uses one canonical format across every client
Pane identity guardserver PID + pane PIDPrevents a recycled pane number from inheriting an old pin
Job pinjob identifierKeeps scheduled and one-off jobs in the same ordered list

Pin an Agent From cwtctl or tmux

From inside the agent pane, run cwtctl agent pin. With no argument, cwtctl reads $TMUX_PANE, so the current pane becomes the shared target. From another shell or a script, pass the ID explicitly with cwtctl agent pin %17.

CommandResult
cwtctl agent pinPin the current tmux pane
cwtctl agent pin %17Pin a specific pane
cwtctl agent unpinUnpin the current pane
cwtctl agent unpin %17Unpin a specific pane

The ClawTab tmux popup exposes the same action as Pin across ClawTab, with p as its shortcut. Its on/off state comes from tmux pane metadata, while the actual mutation goes through cwtctl to the daemon. This keeps the terminal control immediate and the shared state authoritative.

The popup keeps that shared action beside the terminal it controls. The screenshot below shows Pin across ClawTab alongside rename, auto-yes, and fork controls, so pinning stays discoverable without leaving tmux.

If the pane has a generated or manually edited task name, renaming it from an owner surface now follows the same path. The new name appears in the other owner clients without creating a second agent or changing the pane ID.

ClawTab tmux popup showing the Pin across ClawTab action with its p keyboard shortcut
ClawTab 0.5.9 tmux popup screenshot. The pin action sits beside session controls; pane and session details are specific to the captured workspace.

One Pin Flows Through the Control Plane

The shared list belongs to the local ClawTab daemon. Desktop and cwtctl talk to that daemon directly. Remote clients send the same mutation through the encrypted relay, which routes it back to the owner daemon. The daemon persists the ordered list, mirrors pane pin state into tmux, and publishes a fresh snapshot to connected owner clients.

The relay caches the latest owner snapshot so a phone or browser that connects later does not need to reconstruct priority from UI history. The result is deliberately simple: pin once, reconnect elsewhere, and see the same item at the top.

Architecture diagram showing tmux pane percent 17 flowing through the local ClawTab daemon and relay to desktop, web, and mobile pinned lists
The daemon owns shared pin order; the relay distributes owner state without moving or restarting the tmux pane.

Continue the Same Agent on Mobile

Suppose a Codex pane is reviewing a release and is likely to ask for approval. Before leaving your desk, pin it from the pane. Open ClawTab on your phone later and the same agent is already prioritized at the top of the list. Open it when you are ready, inspect the live terminal, answer the prompt, and let the local process continue.

  1. Start or enter the local agent in tmux.
  2. Run cwtctl agent pin, press p in the tmux popup, or use the pin control in desktop.
  3. Leave the terminal without stopping the process.
  4. Open ClawTab mobile or ClawTab Remote. The agent is at the top of your list.
  5. Open the pane only when you want its live terminal. Unpin it from any owner surface when the task is no longer urgent.

This builds on the broader mobile remote-control workflow: notifications tell you that an agent needs attention, while pins preserve the small working set you intend to revisit.

The 0.5.9 Latest view makes that priority visible after you switch surfaces. Pinned sessions stay above recent work while working, idle, and attention states remain visible in the same list.

ClawTab 0.5.9 Latest mobile view showing pinned agents above recent sessions with status markers
The same real product screenshot used in the ClawTab 0.5.9 release overview: pinned agents remain above recent sessions while task states stay visible. Mobile task names are truncated by the layout.

Pins Synchronize; Sessions Stay Local

Shared pinning does not upload the repository or migrate the agent process to a phone. tmux remains the durable local workspace, as explained in why ClawTab uses tmux for agent management. Mobile and web are clients of the existing pane.

That separation avoids several surprising behaviors:

  • No auto-open. Pinning changes list priority only. It does not attach a terminal or interrupt the current mobile view.
  • No duplicate process. Every surface references the same pane ID and daemon-owned state.
  • No stale inheritance. ClawTab records the tmux server and pane process identity. If tmux later reuses %17 for an unrelated shell, the old pin is pruned.
  • No lost legacy choices. Existing client-local pins merge into the shared list once when an owner client first receives shared state.

For the underlying design, see the daemon and tmux control-plane architecture. For recovery after a server or machine restart, use the separate agent session restore workflow.

Owner and Guest Behavior

Shared priority is workspace state, so only the workspace owner can mutate it. Owner desktop, web, mobile, tmux, and cwtctl surfaces receive and update the synchronized list.

Guests keep their own local pins. That lets each collaborator prioritize a different subset without rewriting the owner's workflow. Guests can see the shared pane names chosen by the owner, but those names are read-only from a guest session. Owner pin snapshots are not replayed into guest clients.

This is the same principle used by workspace sharing: collaboration exposes the running work needed for the session while preserving a clear boundary around owner-managed state.

A Small Control With a Larger Effect

Workflow continuation is often framed as session transport. For local coding agents, the stronger primitive is stable identity: one durable tmux pane, one control plane, and several temporary views. Shared pins make that model visible in daily use.

The terminal remains the fastest place to start and steer work. Desktop remains useful for visual layouts and broader management. Web and mobile are there when you leave the desk. A pinned agent ties those surfaces together without pretending the process lives in all of them.

Frequently Asked Questions

No. A pin only moves the agent or job into the prioritized section of the list. You choose when to open its live terminal.

cwtctl uses the TMUX_PANE environment variable, so it pins the tmux pane containing the command. Outside tmux, pass an explicit pane ID such as %17.

Yes. The agent runs in the local tmux pane. Desktop, web, and mobile are clients of that durable session, and a pin is only synchronized priority metadata.

No. Shared pins and names are owner-managed. Guests retain local pin preferences and see owner-provided pane names as read-only.

ClawTab guards pinned pane IDs with the tmux server PID and pane process PID. If the identity changes, the stale pin is removed instead of attaching to the new pane.

Related Articles

Why tmux Is a Good AI Agent Manager
-8 min read

Why tmux Is a Good AI Agent Manager

tmux gives coding agents durable terminals, scriptable pane creation, stable pane IDs, and a way to send commands or restart services without replacing the tools developers already use.

tmuxagent-managerai-coding-agentsclaude-codecodexopencodeorchestration
Claude Code on Your Phone: Remote Control AI Agents From iOS, Android, or Browser
-6 min read

Claude Code on Your Phone: Remote Control AI Agents From iOS, Android, or Browser

Run Claude Code on your Mac and answer agent questions from your phone. Live log streaming, push notifications, permission prompt detection, and multi-viewer support - works with iOS, Android, and any browser via ClawTab Remote. A practical alternative to Claude Code's built-in Remote Control.

remotemobileagents
Two Weeks Rebuilding ClawTab Around a Daemon and tmux
-10 min read

Two Weeks Rebuilding ClawTab Around a Daemon and tmux

How ClawTab made tmux the durable workspace for Claude Code, Codex, and OpenCode: a headless daemon, coherent PTY views, live agent state, useful pane titles, and control from terminal, phone, or GUI.

tmuxdaemoncwtctlclaude-codecodexopencodeterminalrelease
Restore Claude Code, Codex, and OpenCode Sessions in tmux
-8 min read

Restore Claude Code, Codex, and OpenCode Sessions in tmux

How to restore exact Claude Code, Codex, and OpenCode conversations after a tmux restart. Use tmux-resurrect for panes, then ClawTab session ids for claude -r, codex resume, and opencode -s.

tmuxsession-restoreclaude-codecodexopencodetmux-resurrectcwtctl
Share Claude Code Sessions With Your Team: Read/Write Access, No Terminal Required
-5 min read

Share Claude Code Sessions With Your Team: Read/Write Access, No Terminal Required

Give teammates live read or write access to running Claude Code agents. Answer permission prompts, toggle auto-yes, stream logs from any phone or browser - the simplest way to pair on a Claude Code session without screen-sharing or shared terminals.

sharingcollaborationteamremote