Drive an agent on another machine

Start a coding agent on your Mac Studio from your laptop, detach, and pick it up again later — the way tmux works, across your own devices.

Before you start

  • The machine that will run the agent — the host — runs macOS or Linux. A Windows machine can drive sessions but cannot host one yet.
  • Both machines are signed in to the same account. Sessions run only between one person’s own devices; a device in a shared space refuses them for now.
  • The agent — Claude Code, Codex, OpenCode, Pi, Hermes or Continue — is installed on the host (corewire agents install puts one there).
  • The host is a computer you signed in to with the Corewire app — that is all it takes for it to know your other devices are yours. (A headless box set up with an enrolment key cannot tell whether its space is only yours, so it asks you to sign it in first.)
01

Turn sessions on at the host

On mac-studio
corewire sessions enable -agents opencode,claude-coderemote sessions are on: opencode, claude-code may start on your GitHub repositoriesonly from your own devices, and only once this device is proved yours — `corewire sessions` says if it is not

A session on one of your GitHub repositories gets its own copy and branch in ~/Corewire on the host, through that computer’s own GitHub sign-in (gh auth login there) — your checkouts stay as they are, and nothing on our side ever holds a GitHub token. To also let sessions start in a checkout you keep yourself, add its folder with -workspace. Only the agents you name may start. -terminal also allows a plain shell, which can run anything you can: allow it only if you mean to. This is changed at the host and never from another device; in the app it is Devices › Sharing › Allow sessions from my other devices.

02

Start one from your laptop

On laptop
corewire sessions open -node mac-studio -agent opencode -repository you/app -model mac-studio/qwen3-coder:30bsession mac-studio/3f9a1c07b2e4d856 started — Ctrl-] detaches, and it keeps running

The agent runs on the Mac Studio in a terminal, on a new corewire/… branch of you/app, and your laptop’s terminal shows it; -workspace '~/code/app' starts it in one of the host’s own folders instead (quote the ~ so it means the host’s home). -model is optional: the agent reaches that model through the host’s own gateway, with a key minted for the session and revoked when it ends.

In the desktop app and on the phone: New session picks the device, the agent, where it starts — a GitHub repository first — and the model; when it is done, Push and open pull request sends the branch to GitHub. And, when the agent’s ACP adapter is installed on that device, Conversation or Its own terminal. A conversation shows the agent’s messages, its tool calls and its plan, and stops whenever the agent asks permission: nothing is approved until you choose one of its options, from whichever of your screens is open. OpenCode is its own adapter (opencode acp); Claude Code and Codex use npm install -g @agentclientprotocol/claude-agent-acp and @agentclientprotocol/codex-acp.

03

Detach, and come back

Ctrl-] detaches and leaves the agent working. Close the lid, go for a walk. Later, from this machine or another of yours:

On laptop
corewire sessionsDEVICE      SESSION           AGENT     FOLDER               STATE    DRIVEN FROM  PORTSmac-studio  3f9a1c07b2e4d856  opencode  /Users/you/code/app  running  laptop       5173 corewire sessions attach mac-studio/3f9a1c07b2e4d856

Attaching replays what you missed, then carries on live. Every screen attached to a session sees the same thing.

04

Open the dev server it started

Corewire notices the ports a session’s programs listen on and offers them to your other devices — the PORTS column above. Forward one and it opens here:

On laptop
corewire forward mac-studio:5173http://localhost:5173 → OpenCode started a server on :5173 on mac-studio

The forward takes the same port when it is free, so the dev server’s own host checks and hot reload keep working. It closes after thirty idle minutes, or when the server stops.

Something not started by a session — a staging build, a local service — can be offered from the host by hand, to every device in its space:

On mac-studio
corewire ports publish 3000 -label "staging preview"
05

End it

On laptop
corewire sessions kill mac-studio/3f9a1c07b2e4d856

At the host, corewire sessions kill all ends every session it runs at once and turns sessions off until corewire sessions enable — the kill switch. corewire sessions disable stops new ones and other devices attaching; what runs keeps running.

What is recorded

Every open, attach, detach, end and refusal, and every forward, is a line in ~/.corewire/sessions/audit.jsonl on the host: who started what, where and when. Never what was typed.

A session lives as long as the Corewire daemon that hosts it: restarting or updating the daemon ends it, and an update that is not forced waits while any session runs.
Coming

From your phone. The same sessions, with a terminal and a key bar on the phone, and the dev server opened there.