codetwo-agent runs C2's ACP coding runtime without the desktop interface. The remote machine owns
the provider process, workspace, terminals, transcript, and access credentials. T3 Code mobile and
the C2 browser remote connect to the same listener.
Build a native executable on the target operating system and architecture:
cd apps/desktop
bun install
bun run build:remote-agent
install -m 0755 dist/remote-agent/codetwo-agent ~/.local/bin/codetwo-agentThe target machine also needs the selected ACP provider installed and authenticated. Provider availability is reported to connected clients; unavailable providers cannot create a task.
codetwo-agent --port 4599 /path/to/workspaceStartup prints a one-time T3 pairing URL. Use --protocol legacy for the C2 browser remote,
--no-pair when credentials are provisioned separately, and --json for process supervisors.
Durable state is stored in ~/.codetwo-agent unless --data-dir or
CODETWO_AGENT_DATA_DIR is set.
For a CI runner or service manager, keep the workspace and data directory on persistent storage and
send SIGTERM for a clean shutdown. Use the /health endpoint as the readiness probe.
- Start
codetwo-agenton the destination device and copy its T3 pairing URL. - In the source C2 session, open Open → Move task to device.
- Paste the pairing URL and choose a new destination folder on the remote device.
C2 pauses the source at a durable boundary before transfer. The destination receives the complete transcript and execution settings, the Git commit graph and baseline, staged and unstaged binary patches, and non-ignored untracked files including binaries and symbolic links. The source is fenced before the destination becomes active, so only one device can continue the task. If the provider's ACP session cannot be loaded on the new machine, the first remote turn receives the preserved task context before the new prompt.
Dirty submodules are rejected because their nested repository state cannot be represented by the parent repository bundle. Resolve or separately transfer a dirty submodule before moving the task.
The agent listens on all interfaces. Bind it to a trusted LAN or tailnet, or place it behind an authenticated TLS tunnel. Pairing credentials are one-time; paired device access can be revoked from C2. Do not publish the raw port to the public internet.