Start the agent with airpocket run
# anything after the name goes to the agent $ airpocket run claude $ airpocket run codex resume --last
That is the whole change, in any terminal app. You see Claude Code or Codex as you always do, and the phone can answer it from wherever you are.
Or keep typing claude. airpocket setup offers to add two lines to your shell profile, ~/.zshrc for zsh or ~/.bash_profile for bash:
alias claude='airpocket run claude' # airpocket-alias alias codex='airpocket run codex' # airpocket-alias
With them, you type exactly what you typed before. Setup asks first, or takes --alias or --no-alias; it backs the file up, skips an alias you have already defined yourself, and airpocket uninstall removes the lines it added.
Terminal by terminal
- Terminal.app
- WITH RUN
- Start the agent with
airpocket run, or withclaudeonce setup's alias is in. - iTerm2
- WITH RUN
- The same.
- Ghostty
- WITH RUN
- The same.
- Warp
- WITH RUN
- The same.
- VS Code, Cursor and other editors' terminals
- WITH RUN
- The same.
- tmux, in any terminal app
- AS IT IS
- Nothing changes. The phone answers the pane directly, whichever window tmux runs in.
- Superset
- AS IT IS
- Nothing changes. The phone answers through Superset's own command line, and on a Mac with Superset it can also start new sessions.
A session started the plain way, outside all of these, still shows on the phone, read-only, with one line saying how to bring it in: "Read-only here. Start it with airpocket run and the phone can answer."
Watching needs files; answering needs a way in
Watching needs only files and hooks. The phone's view of a session comes from the transcript Claude Code or Codex writes on the Mac, and from the hooks that say what has happened. The terminal it runs in makes no difference.
Answering means typing into the session's own terminal, and most terminal apps give no other program a way to do that. Two kinds of terminal have one:
- A tmux pane. tmux takes keys for any of its panes from the command line. When the agent's hook runs inside tmux, it records the pane, and Airpocket types there, after checking that the agent still runs in it.
- A Superset terminal. Superset's command line reads and types into its own terminals, and a session there records which one it is in.
airpocket run gives every other terminal the first of these: it puts the agent in a tmux pane of Airpocket's own, inside the window you are already in.
What airpocket run does
run starts the agent in a tmux session and attaches your window to it. The tmux around it is set up to stay out of sight:
- its own tmux server, on a socket in Airpocket's data folder, with its own settings. It never touches your tmux server or
~/.tmux.conf; - no status bar and no prefix key, so Ctrl+B stays Claude's;
- Esc with no delay, Shift+Enter, the mouse wheel for scrollback, and copying to the clipboard;
- the agent gets your shell's environment, as if you had started it yourself.
The tmux session is named after the agent and the folder, such as claude-myproject, with a number added when that name is taken.
Where tmux would gain nothing, run starts the agent directly instead: inside tmux or Superset already, where the phone can reach it anyway; when there is no terminal; and for commands that print something and exit, such as claude -p, codex exec or --version.
It needs tmux 3.2 or newer. Setup checks for it and says so if it is missing, and so does run. It is one command:
$ brew install tmux
Closing the window doesn't stop the agent
The window is only a view. Close it and the agent keeps running in its tmux session, where the phone can still answer it. To bring it back into a terminal:
# the one to pick, or a numbered list $ airpocket attach # or by name $ airpocket attach claude-myproject
With no name, attach takes the only running session, or the only one with no window open, and otherwise lists them by number to choose from. A session whose agent has exited isn't offered. Inside tmux, attach refuses and says which command to run in a new window instead.
What to know about it
- Agents outlive Airpocket. An agent started with
runkeeps running after the service stops and afterairpocket uninstall, like anything else in a tmux session. - Your user can reach it. Anything running as your user on the Mac can attach to that tmux socket and type, as with any tmux server of yours.
- Esc can lag right after attaching. tmux holds Esc back while the terminal hasn't answered its questions about itself, which can take a few seconds after you attach. A terminal that answers them has no delay.
- Not yet tried in every terminal app.
runhas been tried with a real Claude in a hidden terminal a test plays: keys, paste, resize, scrollback, detach and attach. Real Terminal.app, iTerm2 and Ghostty windows are still to come, and Codex's Shift+Enter throughrunis checked only at the level of the bytes sent.