Planning & Control Flow

Local-to-Cloud Handoff

Promote an interactive local agent session mid-task to a detached cloud agent that keeps running after the developer disconnects and reports back asynchronously.

Problem

An interactive session is tied to the developer's presence: the process lives in a terminal or editor on the local machine, so disconnecting, sleeping the laptop, or losing the network stalls or kills the run. Keeping the machine awake and tethered for hours wastes the developer's time on a task that no longer needs input, while killing and re-prompting on a fresh remote agent loses the accumulated plan, context, and partial progress built up during the interactive phase.

Solution

Expose an explicit handoff action in the interactive session (a command, prefix, or button) that snapshots the current state and transfers it to a cloud agent runtime. The cloud runtime clones or mounts the repository, restores the plan and conversation context, and resumes the run autonomously in its own sandbox with its own credentials. The local client detaches: the developer can disconnect, and the run survives. On completion or when input is required, the cloud agent notifies the developer out of band and offers a way to reattach, review the diff, or pull the run back to local. The defining move is decoupling execution from the local interactive session so it outlives disconnect; this is distinct from agent-to-agent control transfer and from resuming a previously saved session.

When to use

  • An interactive run becomes long and self-contained and no longer needs turn-by-turn steering.
  • The developer needs to disconnect, sleep the machine, or go mobile without killing the run.
  • A cloud runtime with repo access, credentials, and a sandbox is available to continue execution.
  • Accumulated plan and context are worth preserving rather than re-prompting from scratch.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related