> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hand off to Devin Cloud from Any Agent

> Hand off tasks to a cloud Devin session from the Devin CLI, Claude Code, Codex, or any coding agent.

Hand a task off to a cloud [Devin session](https://docs.devin.ai/get-started/first-run.md) and keep working locally. The cloud session gets its own VM with a shell, browser, and full repo access, so it can keep going after you close your laptop.

There are two ways to hand off:

* **From the [Devin CLI](https://docs.devin.ai/cli.md)** — the built-in `/handoff` command, no setup required.
* **From any other coding agent** — Claude Code, Codex, Cursor, and more, through the [Devin API](https://docs.devin.ai/api-reference/overview.md).

## When to hand off

Hand a task off when it needs more than your local machine, or when you want it to run in the background:

* **VM or server** — running a dev server, hitting endpoints, Docker builds
* **Browser** — screenshots, OAuth flows, end-to-end tests, scraping
* **CI/CD** — pipeline debugging, deployments, infrastructure changes
* **Long-running work** — migrations, batch jobs, large refactors
* **Parallel execution** — offload work to the cloud while you keep coding locally

For the opposite direction, where a cloud session needs a file or command on your computer, see [Local Hands](https://docs.devin.ai/work-with-devin/local-hands.md).

## From the Devin CLI

The [Devin CLI](https://docs.devin.ai/cli.md) is a local coding agent that runs in your terminal. It has a built-in [`/handoff`](https://docs.devin.ai/cli/handoff) command — nothing to install.

```
/handoff fix the flaky integration tests in CI
```

Devin CLI packages up the conversation context and current git branch, then creates a cloud Devin session that picks up where you left off. Track the session's progress from your terminal or in the [Devin web app](https://app.devin.ai).

> [!TIP]
>
> Run `/handoff` without a task description and the cloud session continues from where you left off automatically.

## From other coding agents

Any coding agent — Claude Code, Codex, Cursor, and more — can hand off through the [Devin API](https://docs.devin.ai/api-reference/common-flows.md#hand-off-a-task-from-anywhere).

1. Create an API key in [Settings > Devin API](https://app.devin.ai/settings/devin-api) and export it as `DEVIN_API_KEY`, with your organization ID as `DEVIN_ORG_ID`.
2. Ask your agent to create a Devin session from the current one:

```
Create a Devin session from this session using the Devin API: https://docs.devin.ai/api-reference/common-flows#hand-off-a-task-from-anywhere
```

## Related resources

> [card] [Devin CLI](https://docs.devin.ai/cli.md)
>
> The local coding agent with the built-in `/handoff` command

> [card] [Devin API](https://docs.devin.ai/api-reference/overview.md)
>
> The Sessions API that powers the handoff

> [card] [Devin MCP](https://docs.devin.ai/work-with-devin/devin-mcp.md)
>
> Manage sessions, playbooks, and knowledge from any MCP client


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.