On your machines
Agent sessions
Run Claude Code, Codex or a shell on any of your machines, and come back to it whenever you like.
An agent session is a terminal on one of your machines running an AI agent or your shell. It lives on that machine, not in the app: close Muxin, sleep your laptop or lose the network, and it keeps working. Open it again and you see its screen as it is now, with its recent scrollback.
Want someone to watch a session, or type in it? Share it by link. See Sharing by link.
The agents
Muxin starts any of these, when they’re installed on the machine:
- Claude Code (
claude) - Codex (
codex) - OpenCode (
opencode) - Gemini CLI (
gemini) - Antigravity (
agy) - Amp (
amp) - Pi (
pi) - Copilot CLI (
copilot) - Cursor Agent (
cursor-agent) - Qwen Code (
qwen) - Droid (
droid) - Kimi Code (
kimi) - Shell: your login shell, for anything else.
Muxin finds which ones each machine has. They start in your login shell, in the folder you pick, so nvm, fnm, asdf and each CLI’s own sign-in work as they do in your terminal.
Start one
Click New session (⌘T), or right-click a machine in the sidebar. Pick:
- The machine. VMs and containers are listed under the machine they run in. New VM makes a Linux one for this session; see VMs on your machines.
- The agent. The ones installed there say so.
- The folder. Recent folders and checkouts on that machine are suggested, and you can browse its folders as you type.
- Where, when the folder is a git checkout. A folder starts the agent right there. New worktree gives it a folder and a branch of its own, in
~/muxen/workspaces. Use a worktree when you’re working in the checkout yourself, or to run several agents on one repository at once. - A first message (optional, not for Shell): what the agent should work on. Started from a GitHub issue or pull request, it’s filled in for you.
A worktree is a workspace, so it shows under Agents’ workspaces on the Boxes page too. Deleting it there removes the folder and keeps the branch. See Workspaces.
What it changed
When a session works in a git checkout, a line under its name shows what the work changed:
- The branch, marked worktree when it is one.
- The lines added and removed, in how many files, and how many commits, all counted from the default branch.
- Uncommitted files, if there are any.
- The pull request for the branch: its number, whether it’s open, a draft or merged, and its checks. Click it to open it.
Muxin looks again when the agent stops working, and every minute while it runs. The same line shows on the session’s row in lists and on its workspace.
Actions
The Actions button in a session’s header asks the agent to do the usual next step for you. Right-click a session for the same list.
- Commit: commit the changes with a clear message, without pushing.
- Commit and push: the same, then push the branch.
- Open a pull request: push the branch and open one with the GitHub CLI. Once there is one, this updates its description.
- Review the changes: review the branch like a careful reviewer would, and list what it finds. It doesn’t change code.
- Fix the review comments: read the pull request’s comments, fix them, reply to each one and push.
- Resolve conflicts: bring the branch up to date with the default branch, fix the conflicts and run the tests.
- Write a recap: what changed, what’s left, and what to check.
The menu only lists what makes sense. Outside a checkout, there’s only the recap. On the default branch, there’s no pull request to open. Fix the review comments needs an open pull request.
Each action types a prompt into the agent, as if you had. The agent still asks before it runs a command you haven’t allowed. Change any prompt in Settings › Prompts.
A worktree keeps its git history in your checkout’s .git folder. So an agent with a sandbox, such as Codex, asks before it commits there.
Hand off to another agent
Hand off, in a session’s header, gives its work to another agent: on the same machine, or on another one with the work moved there. The new agent starts with a note of what’s been done. See Hand off and move.
It keeps running
Sessions are kept by Muxin’s agent on the machine (~/.muxen/bin/muxen-agent), the way tmux keeps them. Muxin only attaches to them. Closing the app detaches; the session goes on until you end it.
On a Mac, the agent is a small app of its own, Muxin Agent, with no window or Dock icon. When a program in a session wants the camera, the microphone, your contacts or another app, the Mac asks you once on its screen, as Muxin Agent, and says it’s for a program in a Muxin session. Your answer covers every session on that Mac. Change it in System Settings › Privacy & Security.
After a restart
Sessions come back when their machine restarts. Muxin’s agent saves each one on the machine as it goes. After a reboot, a crash, or Restart from Muxin, the next time Muxin looks at the machine they’re back: the same name, folder and recent scrollback.
- Claude Code, Codex, Copilot CLI, Qwen Code and Kimi Code continue their conversation, right where it was. Their first task isn’t sent again.
- Other agents start fresh in the same folder.
- A shell is a new shell in the same folder.
A line in the terminal says it, and the session’s header says Continued after a restart. Programs that were running in a shell, like a dev server, don’t start again. A box pauses instead; send it a message to go on. See Boxes.
To have agents start fresh instead, turn off Continue agents’ conversations after a restart in Settings › General › Agents, on your Mac or your iPad. Sessions still come back.
Updated from Muxin 0.9 or earlier? Sessions that were already running keep running, but they aren’t saved yet. A machine starts saving its sessions once the ones open there have all ended, or after it restarts once. From then on, they come back.
Helpers
An agent in a session can start another session to help with its task. Say Claude Code asks Codex to run the tests. Codex starts beside it, on the same machine and in the same folder.
- In the sidebar, a helper shows under the session that started it. Its header says Helper of that session, and the session’s header lists its helpers.
- It ends with it. When the session that started it ends, so does the helper. An agent can ask to keep one going.
- It waits for the answer. The agent that started it gets the helper’s answer when it’s done, or its question when it needs someone.
Agents start helpers through Muxin’s MCP tools or command line. They don’t need you to set anything up.
To stop agents from starting helpers, turn off Agents may start helper sessions in Settings › General › Agents, on your Mac or your iPad. Muxin then says no when an agent asks.
Peek at another session
A session’s id in a terminal, like beacon/codex-3f9a, is a link. Agents print it when they start a helper.
- On a Mac, ⌘-click it (Ctrl-click on Linux and Windows). A small window shows that session live, over the one you’re in. You can keep typing in yours.
- On an iPad, tap it. A sheet shows its screen, read again every few seconds.
A peek only watches. It doesn’t type into the other session or change its size. Open goes to it.
In the sidebar
Each machine lists its sessions under it, with what each agent is doing:
- A spinner: it’s working.
- An amber dot: it needs you. It asks something, or wants a permission. The dot stays until you answer.
- A purple dot: it’s done. The dot goes when you open the session.
- A red dot: it exited with an error.
A folded machine shows its most urgent session. Overview and the menu bar show the same across all your machines.
A machine with many sessions lists the first five, plus any that need you. Click more under them to see the rest. A folded machine still lists what you have open from it, like its desktop or a session, and hides the rest.
Hiding sessions
Right-click a session and pick Hide, or click Hide on its row on the machine’s page. It leaves the sidebar, the Agents list and the machine’s page, but keeps running. It comes back by itself when it needs you. To find hidden sessions, search the sidebar, or click hidden at the bottom of the machine’s list. Pick Show to list one again. This works for sessions in Claude’s desktop app too.
Under your machines, Agents lists every agent session in one place. The ones that need you come first, then the ones working, then the rest. Click one to open it. Shells stay under their machine. To hide the list, turn off Show agents in the sidebar in Settings › General › Agents.
Notifications
When a session needs you, stops with an error or finishes, your computer shows a notification. Click it to open the session.
- It goes away once you open the session. The ones left still wait for you.
- The session you’re looking at doesn’t notify.
- Turn them off with Notify me when a session needs me or is done in Settings › General › Menu bar (Tray on Windows and Linux). On a Mac, System Settings › Notifications › Muxin sets how they look.
The menu bar menu lists the same sessions, each with its agent’s logo. Click one to open it.
Claude’s desktop app
If you use Claude Code in Claude’s desktop app, Muxin lists those sessions too, beside its own. They have their titles from Claude. They show working, needs you or done, and they notify like the rest.
- Click one to open it in Claude. On another machine, Muxin opens it in Claude there and shows that machine’s desktop.
- Right-click one for Open in Claude, or to open its folder in your editor.
- A finished one you’ve looked at in Claude isn’t new anymore. One you archive in Claude goes away.
- Muxin’s hooks need to be on: Settings › General › Agents, on unless you turn it off. Not on Windows yet.
How Muxin knows
Claude Code, Codex, Copilot CLI, Qwen Code and Kimi Code tell Muxin what they’re doing. Muxin adds a small hook to their settings on each machine. It does nothing outside a Muxin session, except in Claude’s desktop app, and it can’t break the agent. Other tools’ hooks stay as they are.
Other agents are read from their output and their screen. Muxin knows how their questions look, and checks muxin.dev once a day for newer ways they draw them.
Any program can say it too, with this escape code: printf '\e]7501;state=blocked\e\\'. The states are working, blocked, done and idle. clear goes back to guessing.
To take the hooks out, turn off Settings › General › Agents, on your Mac or your iPad. Each machine keeps the newest choice.
The terminal
- Everything you type goes to the agent: Esc, Ctrl-C, Tab, the arrows, and Option- or Shift-Enter for a new line. ⌘C copies a selection and ⌘V pastes.
- On a Mac, Option types what your keyboard puts on it when the layout needs that, like
@on a German keyboard. On layouts that don’t, like US, Option stays Meta. - ⌘D splits the terminal to the right and ⇧⌘D below it: a new shell on the same machine, in the same folder. ⌥⌘← and ⌥⌘→ move between panes. ⇧⌘↵ shows one pane alone (again for the whole split), and ⇧⌘W closes it. Each pane is a session of its own, and splits come back when you reopen Muxin.
- On a slow network, the terminal you’re typing in goes first, and a hidden one that keeps printing is let go until you open it again. See On a slow network.
- Desktop in a session’s header shows the machine’s screen beside the terminal, to check what the agent did. See Desktops.
Open in your editor
The </> button in a session’s header lists the editors on this computer (Zed, Cursor, VS Code) and opens the session’s folder in the one you pick, over ssh. The one you choose in Settings › General › Editor comes first. From a terminal, muxin edit beacon:~/code/api does the same.
Rename, restart, end
- Rename: right-click the session. The name is kept on the machine, so every Muxin that looks at it sees it.
- Restart starts an exited session again, in the same folder. The agents that continue after a restart continue their conversation here too, as after a restart.
- End stops it for good.
On Windows
On a Windows PC a session runs in PowerShell (PowerShell 7 when it’s installed) and keeps running there like anywhere else. See Windows.
From a terminal and from other agents
Your AI agents can start sessions, read their screens, see what an agent is asking and answer it. The MCP tools are session_start, session_read, session_wait, session_question, session_answer, session_send, session_action, session_handoff and session_stop; session_list includes what each session changed. The CLI has the same:
muxin session start beacon claude --cwd ~/code/api --prompt "fix the failing test"
muxin session read beacon/claude-3f9a # what’s on its screen
muxin session wait beacon/claude-3f9a # until it’s done or needs you; what it said
muxin session question beacon/claude-3f9a # what it’s asking, and the options
muxin session answer beacon/claude-3f9a 1 # pick one
muxin session do beacon/claude-3f9a pull_request # an action: commit, review, recap, …
muxin session attach beacon/claude-3f9a # open it in this terminal
muxin session handoff beacon/claude-3f9a codex # Codex takes over
From inside a session, an agent leaves out the machine to start a helper beside it:
muxin session start codex --prompt "run the tests and list what fails"
muxin session wait beacon/codex-8k2p # its answer
See MCP for your agents and The command line.