Overview
Hand Devin a production bug where a true or false setting is read the wrong way, ask for a failing test first and a minimal fix, and review every line of its pull request before merging.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Prerequisites
- A Devin account connected to the repository, a test suite, and a staging environment.
How It Works
Write the bug report for Devin: which setting misbehaves, where it is read, what users see, and how to reproduce it. Ask Devin to reproduce the bug first and add a test that fails because of it, then make the smallest change that makes that test pass, listing each file it touched with a reason. Follow the session and take over if it starts changing code outside the area of the bug. When the pull request arrives, enable Devin Review on it, then read the full diff yourself. Run the test suite, deploy to a staging copy, confirm the symptom is gone, and only then approve the merge and the production deploy.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Devin.
- Check the prerequisitesA Devin account connected to the repository, a test suite, and a staging environment.
- Gather your detailsCollect what the prompt asks for: Setting or flag name, Where it is read, Current wrong behaviour, Expected behaviour, Steps to reproduce.
- 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: Fix one flag bug with a failing test first
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Bug: the setting [Setting or flag name] in [Where it is read] is treated as [Current wrong behaviour] when it should be [Expected behaviour]. Reproduce it with these steps: [Steps to reproduce]. Write a test that fails because of the bug, then make the smallest change that makes it pass. Keep the change limited to the code that reads this setting. List every file you changed with a one-line reason, then open a draft pull request for my review; never merge or deploy.Read the full diff and the list of touched files, run the tests and check staging yourself, then approve the merge and the production deploy.
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. The Devin docs say it can repro and fix bugs, write, run and test code, and let you follow its work in real time and take over to run commands or edit code. The when-to-use guide says Devin can investigate production issues and that Devin Review can catch bugs before you look at the pull request. The pages do not say how Devin patches compare with a human fix, so your review of the pull request stays part of the job.
Limitations and Considerations
Keep merging and deploying as human decisions, and test on staging before production. Access is through a sign-up with Individual and Teams plans, or through your administrator if your company already works with Cognition. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Introducing 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
- Devin is an autonomous AI software engineer that can write, run and test code, and can be asked to repro and fix bugs.
- You can follow Devin's work in real time and take over to run commands, make direct code edits or test its code.
- To access Devin, sign up at app.devin.ai; Individual and Teams plans are available, and if your company is already working with Cognition you can request permissions from your Administrator.
- 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
- Devin can investigate production issues, query data and read designs within a single session.
- Enable Devin Review to catch bugs before you even look at the PR.