Overview
Explore a codebase and scope a task with Devin CLI in your terminal, then use /handoff to pass the work to a cloud Devin session that continues on its own and returns a draft pull request.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Devin · Devin CLI
- Prerequisites
- A Devin account with access to cloud sessions and Devin CLI installed in your terminal, with the repository connected for the cloud session.
How It Works
Open a terminal in the repository and start Devin CLI. Ask it to find the files, patterns and tests that matter for the task, and agree on the approach and the success criteria with it while you still have your local context at hand. When the remaining work is longer than you want to supervise, type /handoff to transfer it to a cloud Devin session. Make sure the requirements and the files you identified are stated in the session before you hand it over. Carry on with other work, then return to the draft pull request, read the diff, check CI and decide whether it is ready to merge.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Devin.
- Connect the toolsConnect the tools this workflow relies on: Devin, Devin CLI.
- Check the prerequisitesA Devin account with access to cloud sessions and Devin CLI installed in your terminal, with the repository connected for the cloud session.
- Gather your detailsCollect what the prompt asks for: What the task should achieve, Command that runs the tests, Limits the change must respect.
- Run the starter promptPaste the starter prompt below into Devin and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.devin.ai before you rely on it.
Practical Starter Prompt: Scope a task before handing it off
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
I want to [What the task should achieve] in this repository. Find the files, patterns and tests involved, and list them. Propose an approach in a few steps and the success criteria, including which tests must pass ([Command that runs the tests]). Note anything about [Limits the change must respect] that the work must respect. Do not change any files yet: once I agree, I will hand this off to a cloud session, which should open a draft pull request and not merge it.Agree on the plan locally, then type /handoff. Check that the cloud session restates the plan before it starts, and review the draft pull request yourself before merging.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Devin's documentation describes Devin CLI for local coding and the /handoff command for transferring work to a cloud Devin session. It does not say how much context survives a handoff in every case, so check the cloud session's first steps against what you agreed locally.
Limitations and Considerations
Devin's guidance is that tasks with clear success criteria, test suites or CI checks give the best results, and that very large projects are better split into focused sessions. The cloud session works in its own environment, so check that it can reach the repository and anything else the task needs. A person reviews the pull request and decides whether to merge. Check the cost of cloud sessions on your plan. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- When to Use Devin - Devin Docs (opens in a new tab)
Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Use Devin CLI for local coding: Work with Devin directly from your terminal without leaving your editor.
- Use /handoff to seamlessly transfer work to a cloud Devin session when needed.
- Can I describe clear success criteria? Tasks with test suites, CI checks, or verifiable outcomes yield the best results.
- Review findings Devin escalated, check CI, and decide whether the PR is ready to merge.