Skip to content

Hub

This guide is part of where your agents run.

The hub lets you check, start, steer, and answer your clones from the Claude app on your phone, or from any MCP client. It is an MCP server on a machine that stays on, behind Tailscale Funnel. It needs no domain and no shadowclone account.

$ shadowclone hub expose
Public URL: https://studio.tail1234.ts.net
Connector URL: https://studio.tail1234.ts.net/mcp
$ shadowclone hub pair
Pairing code: K7QM-2WXA

On your phone, ask Claude “what are my clones doing?” Claude lists them, with the ones that need you first. It can also send a clone your answer.

  1. Set up clones on the machine, as the clones guide describes. The hub reaches the clones of this machine.
  2. Install Tailscale and sign in. Funnel must be on for your tailnet. If it is off, hub expose prints the link that turns it on.
  1. Run shadowclone hub service. The hub then starts with the machine. To try it first, run shadowclone hub serve in a terminal.
  2. Run shadowclone hub expose. It turns on Tailscale Funnel for the hub and prints the connector URL.
  3. Run shadowclone hub pair, and keep the code. The code works once, for 10 minutes.
  4. In Claude, open Settings, then Connectors, and add a custom connector with the connector URL.
  5. Claude opens the hub’s sign-in page. Check that the page names claude.ai, type the code, and select Approve.

The connector then works in Claude on the web, Desktop, and mobile. Claude Code on another machine can add the same URL with claude mcp add --transport http shadowclone-hub <connector URL>.

If you run your own proxy on the hub machine, run shadowclone hub expose --url https://<your proxy> instead of step 2. The proxy must send requests to http://127.0.0.1:4517 and set X-Forwarded-For.

Each other machine with clones joins the hub. It opens one connection to the hub and needs no open port.

  1. Set up clones on the other machine.
  2. On the hub machine, run shadowclone hub pair --node.
  3. On the other machine, run the shadowclone hub join command that the hub printed. It saves the link and starts the node link as a service.
  4. On the hub machine, run shadowclone hub nodes, and check the name and the time that the hub last saw it.

Claude now lists the clones of each machine. To start a clone on a machine, name it: “start a clone on work to fix the parser”. On a joined machine, Claude Code and Codex see every machine through shadowclone mcp, with no sign-in.

If you do not want the Claude app to reach the hub, run shadowclone hub expose --tailnet instead of hub expose. Then only machines on your tailnet reach the hub.

The hub can also list the Claude Code and Codex sessions that you start yourself, and send them messages. This is off until you turn it on on each machine.

  1. Run shadowclone live enable. It adds hooks to Claude Code and Codex, and keeps your own hooks.
  2. Start a new agent session. Codex asks you to trust the new hooks.
  3. Ask Claude “what are my sessions doing?” The answer lists each live session with a live- id, its state, and its last message. In Claude, the answer also opens the session board.
  4. Ask Claude to send a session a message. A working session gets it after its next tool call or at the end of its turn. An idle session in tmux gets it typed at its prompt. This includes a Claude Code session whose turn ended with an API error.

cmux lets only processes inside cmux type into its terminals. So a message for an idle session in cmux waits for the next turn, unless you let the hub type into cmux. Answer permission prompts in the terminal or with Claude Code Remote Control. Run shadowclone live disable to remove the hooks and the saved state.

In Claude, the answer to “what are my sessions doing?” opens the session board in the chat. It shows the live sessions of every machine that joined the hub. Below them, it shows each project: its open plan steps, the steps that a session took, and the decisions that wait for you. Claude renders MCP Apps on the web, on Desktop, and in its iOS and Android apps. ChatGPT also renders MCP Apps, but nobody has tested the board in ChatGPT yet.

  • The card at the top is the newest session in the first group that has one: needs you, ready for you, then your turn. It shows the last message. For an idle session, type your reply in the box, and select Send. The board then shows the hub’s answer, which starts with “Sent” or “Queued”.
  • A session that waits for a permission answer has no reply box. Answer it in the terminal or in Remote Control.
  • A session that asks a question with shadowclone_ask shows the question and one button for each option. The option that the agent recommends has the mark “Recommended”. Tap an option, or type another answer and select Answer.
  • Tap a session to read its full last message.
  • Select Open the board to see all sessions in full screen. They are in groups: needs you, ready for you, your turn, and working. The board also shows the pairs and the number of ended sessions.
  • Select Pair two sessions, and then Pair on each of the two sessions. Select Unpair to end a pair. Only sessions of the hub machine can pair.
  • Select Refresh to read the sessions again. The board does not refresh by itself.

The board shows session text as plain text. It has no network access. Each button calls a hub tool through Claude, with your sign-in, and no button calls a tool until you tap it. A machine with an older shadowclone shows its text answer, with a line that asks you to update shadowclone on it.

By default, cmux accepts commands only from processes that start inside cmux. The hub and the node link run as services, outside cmux. So a message for an idle cmux session waits until you type in that session. Password mode lets the hub type the message. shadowclone does not change this setting for you.

  1. Copy ~/.config/cmux/cmux.json to a backup file with the date in its name.
  2. In that file, set "socketControlMode": "password" in the automation object.
  3. In cmux Settings, save a socket password.
  4. Send a message to an idle cmux session from the board. The answer starts with “Sent”.
  5. Check that a Claude Code notification still shows in cmux. If a cmux integration stops working, restore the backup.

The cmux CLI reads the password that you saved in Settings. So in password mode, any process of your user can control cmux, not only the processes inside cmux.

Task briefs give each live session a name and say what it needs from you. This is off until you turn it on, after live sessions.

  1. Run shadowclone live briefs enable. Each live session now keeps a redacted copy of its first and latest prompt. The hub sends each brief to the clients that you approved.
  2. Work as usual. After each turn, the fast model of the session’s own engine writes a short brief. The brief has a name, the goal, what the agent did, and the kind (question, finished, or blocked).
  3. Run shadowclone live list. Each session with a brief shows its name. The kind shows only while the session is idle and the brief describes its last message.
  4. Run shadowclone live show <live-id> to read one brief, with the question and the options that the agent offered.
  5. Open the session board. Each session with a current brief shows its name, its goal, and what it needs from you, above its last message. Tap the session to also see what the agent did.
  6. If a session asks a question with options, tap an option. The board sends the option text to the session, the same as a typed reply. You can also type a different reply.

On the board, a question or blocked brief puts the session in “Needs you”, and a finished brief puts it in “Ready for you”. A session with no current brief stays in its usual group. If you run shadowclone hub notify --text, a push for a question names the task and gives the question. The hub then sends each brief to the clients that you approved, and with --text, to ntfy.

A brief is a summary by a model, so it can be wrong. The last message stays next to it. Each session gets at most 12 brief calls in one hour, and no call when its last message did not change. Run shadowclone live briefs disable to stop and delete the saved prompts and briefs.

With task briefs on, an agent in a live session can ask you a question with the shadowclone_ask tool. It gives 2 to 4 options and the option that it recommends. The tool never picks an option for you.

  1. Ask Claude “what are my sessions doing?” A session with a question shows needs-you, with the question id, the options, and the recommended option.
  2. Tell Claude your answer, for example “answer the question with Keep it”. Claude calls shadowclone_clone answer with the live- id, the question id, and your text.
  3. If the agent still waits, it gets your answer as the tool result and continues. The answer says “got your answer”.
  4. If the agent stopped waiting after 50 seconds, it ended its turn with the question. Your answer then reaches the session as a message, like Send.

On the session board, the question shows in its row and in the top card, with one button for each option. Tap an option, or type another answer and select Answer. The board calls shadowclone_clone answer with the question id, and then reads the sessions again. If you run shadowclone hub notify --text, the push for the question gives the question text.

For a saved task with a lead, a worker and a document library, open local Projects.

Two live sessions on one machine can send each other notes after you pair them. Use this when two sessions work on related changes. Each session needs the shadowclone MCP server, which the shadowclone plugin adds.

  1. Find the two live- ids with shadowclone live list, or ask Claude “what are my sessions doing?”
  2. Run shadowclone live pair <live-id> <live-id>, or ask Claude in the Claude app to pair the two sessions.
  3. Each session gets a pairing note with the name of its peer and its own key. The note arrives like your messages: after the next tool call, at the end of the turn, or typed at an idle prompt.
  4. A session sends a note with the shadowclone_peer tool. The peer gets it in <peer-message from="live-...">, with a line that says that the note is not from you.

For example, start Claude Code and Codex in the same checkout after enabling live sessions. Use the CLI steps above to pair them on that machine.

  1. In Claude Code, enter Use your peer key to ask Codex which cart test covers duplicate items.
  2. In Codex, enter Reply to Claude with the test name.
  3. Return to the Claude session to read the reply.

This exchange works with the hub off.

A pair allows 20 notes in total, and it ends when either session ends. A session can be in one pair at a time. Run shadowclone live pairs to list the pairs, and shadowclone live unpair <pair-id> to end one.

No session can pair itself, because the server that sessions load has no pairing tool. The label tells each session to follow only your instructions. A note is still a prompt with your permissions, so pair only sessions that can share their work. An idle Codex app session has no terminal, so it gets a note when you next type in it.

The hub can send a push when a clone or a live session needs you, and when a clone finishes. It uses ntfy, which has free apps for iOS and Android. If ntfy does not accept a push, the hub tries it again every 15 seconds for about one hour.

  1. Run shadowclone hub notify. It makes a private topic and prints its URL.
  2. In the ntfy app, subscribe to that URL.
  3. Run shadowclone hub notify test, and check the push on your phone.

A push names the clone, its state, and its machine. Run shadowclone hub notify --text to add the repository and the question. With task briefs on, a question in a brief also sends a push, and --text adds the task name. Anyone who knows the topic can read the pushes, so keep the URL private. To use your own ntfy server, run shadowclone hub notify --url https://<your server>/<topic>. Run shadowclone hub notify --off to stop the pushes.

A connected client has the two clone tools: shadowclone_sessions reads, and shadowclone_clone starts, steers, answers, and stops. It also has shadowclone_pair for your live sessions, and the session board. Claude asks you before it calls shadowclone_clone. Text that comes from a clone is data. The hub tells the client so, and the client must not follow instructions in it.

The hub can start agents that act as you on GitHub. Treat a pairing code like a password.

  • shadowclone hub clients lists the approved clients. hub clients revoke <id> stops a client at once.
  • shadowclone hub lock refuses every request, for example when you lose your phone. hub unlock allows them again.
  • shadowclone hub allow anthropic tailnet accepts requests only from Claude’s servers and your tailnet. Keep tailnet when other machines joined. hub allow --any removes the limit.
  • shadowclone hub nodes remove <name> stops a machine. It must join again with a new code. On that machine, shadowclone hub leave removes the link.
  • shadowclone hub status shows the URL, the lock, the allowed sources, and the number of clients.

A wrong code counts against every open code, and a code locks after 5 wrong tries. Access tokens last 1 hour, and a refresh token works once.

  1. Run shadowclone hub expose --off to turn off Funnel for the hub.
  2. Remove the service. On macOS, run launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/dev.shadowclone.hub.plist and delete the file. On Linux, run systemctl --user disable --now shadowclone-hub.service.
  3. Delete ~/.shadowclone/hub/. Every client must then sign in again.
  4. Remove the connector in Claude.